From 1fec64a40219cdd3cf4a2248cb0b68efb83f33da Mon Sep 17 00:00:00 2001 From: Nathan Letwory Date: Sun, 30 Dec 2007 22:52:00 +0000 Subject: * revert my change to windowmanager move/size handling. * made win32 ghost getClientBounds so that it returns area compatible with osx getClientBounds - if a window is non-fullscreen, substract decoration, since that'll be added by GHOST_WindowWin32() * use SetWindowLongPtr/GetWindowLongPtr (instead of SetWindowLong) as it is compatible with 64bit windows. --- source/blender/windowmanager/intern/wm_window.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'source') diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index 0e135f9942f..00364414342 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -368,23 +368,20 @@ int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr private) } case GHOST_kEventWindowSize: case GHOST_kEventWindowMove: { - GHOST_RectangleHandle client_rect, window_rect; + GHOST_RectangleHandle client_rect; int l, t, r, b, scr_w, scr_h; int wl, wt, wr, wb; - window_rect = GHOST_GetWindowBounds(win->ghostwin); client_rect= GHOST_GetClientBounds(win->ghostwin); GHOST_GetRectangle(client_rect, &l, &t, &r, &b); - GHOST_GetRectangle(window_rect, &wl, &wt, &wr, &wb); GHOST_DisposeRectangle(client_rect); - GHOST_DisposeRectangle(window_rect); wm_get_screensize(&scr_w, &scr_h); win->sizex= r-l; win->sizey= b-t; - win->posx= wl; - win->posy= scr_h - wt - win->sizey; + win->posx= l; + win->posy= scr_h - t - win->sizey; if(type!=GHOST_kEventWindowSize) printf("win move event pos %d %d size %d %d\n", win->posx, win->posy, win->sizex, win->sizey); -- cgit v1.2.3