From: Jacek Caban jacek@codeweavers.com
Signed-off-by: Jacek Caban jacek@codeweavers.com --- dlls/winemac.drv/surface.c | 4 ++-- dlls/winemac.drv/window.c | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/dlls/winemac.drv/surface.c b/dlls/winemac.drv/surface.c index 5d51d18422a..e8039b3b3aa 100644 --- a/dlls/winemac.drv/surface.c +++ b/dlls/winemac.drv/surface.c @@ -86,7 +86,7 @@ static void update_blit_data(struct macdrv_window_surface *surface)
if (NtGdiCombineRgn(blit, surface->drawn, 0, RGN_COPY) > NULLREGION && (!surface->region || NtGdiCombineRgn(blit, blit, surface->region, RGN_AND) > NULLREGION) && - OffsetRgn(blit, surface->header.rect.left, surface->header.rect.top) > NULLREGION) + NtGdiOffsetRgn(blit, surface->header.rect.left, surface->header.rect.top) > NULLREGION) surface->blit_data = get_region_data(blit, 0);
NtGdiDeleteObjectApp(blit); @@ -285,7 +285,7 @@ struct window_surface *create_surface(macdrv_window window, const RECT *rect, if (old_mac_surface && old_mac_surface->drawn) { surface->drawn = NtGdiCreateRectRgn(rect->left, rect->top, rect->right, rect->bottom); - OffsetRgn(surface->drawn, -rect->left, -rect->top); + NtGdiOffsetRgn(surface->drawn, -rect->left, -rect->top); if (NtGdiCombineRgn(surface->drawn, surface->drawn, old_mac_surface->drawn, RGN_AND) <= NULLREGION) { NtGdiDeleteObjectApp(surface->drawn); diff --git a/dlls/winemac.drv/window.c b/dlls/winemac.drv/window.c index 36e34abbd12..59788244c22 100644 --- a/dlls/winemac.drv/window.c +++ b/dlls/winemac.drv/window.c @@ -396,8 +396,8 @@ static void sync_window_region(struct macdrv_win_data *data, HRGN win_region) NtUserMirrorRgn(data->hwnd, hrgn); if (hrgn) { - OffsetRgn(hrgn, data->window_rect.left - data->whole_rect.left, - data->window_rect.top - data->whole_rect.top); + NtGdiOffsetRgn(hrgn, data->window_rect.left - data->whole_rect.left, + data->window_rect.top - data->whole_rect.top); } region_data = get_region_data(hrgn, 0); if (region_data) @@ -540,7 +540,8 @@ static void sync_window_min_max_info(HWND hwnd) primary_monitor_rect.left = primary_monitor_rect.top = 0; primary_monitor_rect.right = NtUserGetSystemMetrics(SM_CXSCREEN); primary_monitor_rect.bottom = NtUserGetSystemMetrics(SM_CYSCREEN); - AdjustWindowRectEx(&primary_monitor_rect, adjustedStyle, ((style & WS_POPUP) && GetMenu(hwnd)), exstyle); + AdjustWindowRectEx(&primary_monitor_rect, adjustedStyle, + ((style & WS_POPUP) && NtUserGetWindowLongPtrW(hwnd, GWLP_ID)), exstyle);
xinc = -primary_monitor_rect.left; yinc = -primary_monitor_rect.top; @@ -1848,7 +1849,8 @@ LRESULT macdrv_SysCommand(HWND hwnd, WPARAM wparam, LPARAM lparam)
/* prevent a simple ALT press+release from activating the system menu, as that can get confusing */ - if (command == SC_KEYMENU && !(WCHAR)lparam && !GetMenu(hwnd) && + if (command == SC_KEYMENU && !(WCHAR)lparam && + !NtUserGetWindowLongPtrW(hwnd, GWLP_ID) && (NtUserGetWindowLongW(hwnd, GWL_STYLE) & WS_SYSMENU)) { TRACE("ignoring SC_KEYMENU wp %lx lp %lx\n", wparam, lparam);