diff options
author | Ton Roosendaal <ton@blender.org> | 2007-12-30 16:30:31 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2007-12-30 16:30:31 +0300 |
commit | 1039bc26fb466e41cea11bb77ed7b3b2d335f594 (patch) | |
tree | e53ef0ebbff6ff4ab0a43f960b944bdda6fd3063 /source/blender/windowmanager | |
parent | 81035f6e21c6bf7d427634dc49eea48d9b4b4e0b (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 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_window.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index 4a6a3c572d3..16ed2e7b4e5 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -369,12 +369,12 @@ int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr private) // window_handle(win, REDRAW, 1); break; } - case GHOST_kEventWindowSize: { + case GHOST_kEventWindowSize: + case GHOST_kEventWindowMove: { GHOST_RectangleHandle client_rect; int l, t, r, b, scr_w, scr_h; - /* was GetClientBounds, doesnt work (at least osx) */ - client_rect= GHOST_GetWindowBounds(win->ghostwin); + client_rect= GHOST_GetClientBounds(win->ghostwin); GHOST_GetRectangle(client_rect, &l, &t, &r, &b); GHOST_DisposeRectangle(client_rect); @@ -384,9 +384,9 @@ int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr private) win->sizey= b-t; win->posx= l; win->posy= scr_h - t - win->sizey; -#ifdef __APPLE__ - win->posy-= 24; /* gutter... see ghost, bad stuff */ -#endif + + if(type!=GHOST_kEventWindowSize) + printf("win move event pos %d %d size %d %d\n", win->posx, win->posy, win->sizex, win->sizey); // window_handle(win, RESHAPE, 1); break; |