Jacek Caban : winemac: Directly use win32u in more places.
Alexandre Julliard
julliard at winehq.org
Mon May 30 15:34:59 CDT 2022
Module: wine
Branch: master
Commit: ef0cb9157fec8e23cf970b7a1e2934a974fc55da
URL: https://source.winehq.org/git/wine.git/?a=commit;h=ef0cb9157fec8e23cf970b7a1e2934a974fc55da
Author: Jacek Caban <jacek at codeweavers.com>
Date: Sat May 28 17:42:38 2022 +0200
winemac: Directly use win32u in more places.
Signed-off-by: Jacek Caban <jacek at 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);
More information about the wine-cvs
mailing list