* 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.
This commit is contained in:
Nathan Letwory
2007-12-30 22:52:00 +00:00
parent f25ce8d0ff
commit 1fec64a402
4 changed files with 24 additions and 21 deletions

View File

@@ -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);