Mercurial > dwindows
changeset 947:c9f6ba940453
On window sizes we need to flip the origin point on the frame too on the Mac.
Also set the size first in the combined function so we calculate frame size correctly.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sat, 30 Apr 2011 21:49:11 +0000 |
parents | c64d3ca566f9 |
children | e48384ca49b7 |
files | mac/dw.m |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mac/dw.m Sat Apr 30 21:33:27 2011 +0000 +++ b/mac/dw.m Sat Apr 30 21:49:11 2011 +0000 @@ -7539,6 +7539,9 @@ if([ object isKindOfClass:[ NSWindow class ] ]) { NSWindow *window = handle; + point.y -= [window frame].size.height; + NSLog(@"Setting position %dx%d screen height %d frame height %d new y %d", + (int)x, (int)y, (int)[[NSScreen mainScreen] frame].size.height, (int)[window frame].size.height, (int)point.y); [window setFrameOrigin:point]; } DW_MUTEX_UNLOCK; @@ -7555,8 +7558,8 @@ */ void API dw_window_set_pos_size(HWND handle, LONG x, LONG y, ULONG width, ULONG height) { + dw_window_set_size(handle, width, height); dw_window_set_pos(handle, x, y); - dw_window_set_size(handle, width, height); } /* @@ -7579,7 +7582,7 @@ if(x) *x = rect.origin.x; if(y) - *y = [[NSScreen mainScreen] frame].size.height - rect.origin.y; + *y = [[NSScreen mainScreen] frame].size.height - rect.origin.y - rect.size.height; if(width) *width = rect.size.width; if(height)