Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2007-12-30 16:30:31 +0300
committerTon Roosendaal <ton@blender.org>2007-12-30 16:30:31 +0300
commit1039bc26fb466e41cea11bb77ed7b3b2d335f594 (patch)
treee53ef0ebbff6ff4ab0a43f960b944bdda6fd3063 /intern/ghost
parent81035f6e21c6bf7d427634dc49eea48d9b4b4e0b (diff)
Windowmanager, ghost side:
- Added GHOST_kEventWindowMove event, for sending event that the window has moved - Fixed GHOST_GetClientBounds() for OSX (get window rect) Todos: - add same event for X11 and Windows - solve why ghost doesn't call client event-proc while scaling window (at least, not in osx)
Diffstat (limited to 'intern/ghost')
-rw-r--r--intern/ghost/GHOST_Types.h1
-rw-r--r--intern/ghost/intern/GHOST_SystemCarbon.cpp6
-rw-r--r--intern/ghost/intern/GHOST_WindowCarbon.cpp4
3 files changed, 10 insertions, 1 deletions
diff --git a/intern/ghost/GHOST_Types.h b/intern/ghost/GHOST_Types.h
index d5575354370..b11e7c922f0 100644
--- a/intern/ghost/GHOST_Types.h
+++ b/intern/ghost/GHOST_Types.h
@@ -144,6 +144,7 @@ typedef enum {
GHOST_kEventWindowDeactivate,
GHOST_kEventWindowUpdate,
GHOST_kEventWindowSize,
+ GHOST_kEventWindowMove,
GHOST_kNumEventTypes
} GHOST_TEventType;
diff --git a/intern/ghost/intern/GHOST_SystemCarbon.cpp b/intern/ghost/intern/GHOST_SystemCarbon.cpp
index e1e3853e8a8..ad2088c8b14 100644
--- a/intern/ghost/intern/GHOST_SystemCarbon.cpp
+++ b/intern/ghost/intern/GHOST_SystemCarbon.cpp
@@ -936,10 +936,16 @@ bool GHOST_SystemCarbon::handleMouseDown(EventRef event)
* events. By setting m_ignoreWindowSizedMessages these are suppressed.
* @see GHOST_SystemCarbon::handleWindowEvent(EventRef event)
*/
+ /* even worse: scale window also generates a load of events, and nothing
+ is handled (read: client's event proc called) until you release mouse (ton) */
+
GHOST_ASSERT(validWindow(ghostWindow), "GHOST_SystemCarbon::handleMouseDown: invalid window");
m_ignoreWindowSizedMessages = true;
::DragWindow(window, mousePos, &GetQDGlobalsScreenBits(&screenBits)->bounds);
m_ignoreWindowSizedMessages = false;
+
+ pushEvent( new GHOST_Event(getMilliSeconds(), GHOST_kEventWindowMove, ghostWindow) );
+
break;
case inContent:
diff --git a/intern/ghost/intern/GHOST_WindowCarbon.cpp b/intern/ghost/intern/GHOST_WindowCarbon.cpp
index 04debe36191..0473b16335a 100644
--- a/intern/ghost/intern/GHOST_WindowCarbon.cpp
+++ b/intern/ghost/intern/GHOST_WindowCarbon.cpp
@@ -255,7 +255,9 @@ void GHOST_WindowCarbon::getClientBounds(GHOST_Rect& bounds) const
{
Rect rect;
GHOST_ASSERT(getValid(), "GHOST_WindowCarbon::getClientBounds(): window invalid")
- ::GetPortBounds(m_grafPtr, &rect);
+// ::GetPortBounds(m_grafPtr, &rect);
+ ::GetWindowBounds(m_windowRef, kWindowContentRgn, &rect);
+
bounds.m_b = rect.bottom;
bounds.m_l = rect.left;
bounds.m_r = rect.right;