mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-15 08:00:11 +00:00
winemac: Directly use win32u in more places.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Huw Davies <huw@codeweavers.com>
This commit is contained in:
parent
0dc076154e
commit
169a09b443
|
@ -70,7 +70,7 @@ CGImageRef create_cgimage_from_icon_bitmaps(HDC hdc, HANDLE icon, HBITMAP hbmCol
|
|||
/* draw the cursor frame to a temporary buffer then create a CGImage from that */
|
||||
memset(color_bits, 0x00, color_size);
|
||||
NtGdiSelectBitmap(hdc, hbmColor);
|
||||
if (!DrawIconEx(hdc, 0, 0, icon, width, height, istep, NULL, DI_NORMAL))
|
||||
if (!NtUserDrawIconEx(hdc, 0, 0, icon, width, height, istep, NULL, DI_NORMAL))
|
||||
{
|
||||
WARN("Could not draw frame %d (walk past end of frames).\n", istep);
|
||||
return NULL;
|
||||
|
@ -129,7 +129,7 @@ CGImageRef create_cgimage_from_icon_bitmaps(HDC hdc, HANDLE icon, HBITMAP hbmCol
|
|||
/* draw the cursor mask to a temporary buffer */
|
||||
memset(mask_bits, 0xFF, mask_size);
|
||||
NtGdiSelectBitmap(hdc, hbmMask);
|
||||
if (!DrawIconEx(hdc, 0, 0, icon, width, height, istep, NULL, DI_MASK))
|
||||
if (!NtUserDrawIconEx(hdc, 0, 0, icon, width, height, istep, NULL, DI_MASK))
|
||||
{
|
||||
WARN("Failed to draw frame mask %d.\n", istep);
|
||||
CGImageRelease(cgimage);
|
||||
|
@ -199,7 +199,7 @@ CGImageRef create_cgimage_from_icon(HANDLE icon, int width, int height)
|
|||
ICONINFO info;
|
||||
BITMAP bm;
|
||||
|
||||
if (!GetIconInfo(icon, &info))
|
||||
if (!NtUserGetIconInfo(icon, &info, NULL, NULL, NULL, 0))
|
||||
return NULL;
|
||||
|
||||
NtGdiExtGetObjectW(info.hbmMask, sizeof(bm), &bm);
|
||||
|
|
|
@ -1045,9 +1045,9 @@ void macdrv_keyboard_changed(const macdrv_event *event)
|
|||
|
||||
macdrv_compute_keyboard_layout(thread_data);
|
||||
|
||||
ActivateKeyboardLayout(thread_data->active_keyboard_layout, 0);
|
||||
NtUserActivateKeyboardLayout(thread_data->active_keyboard_layout, 0);
|
||||
|
||||
SendMessageW(GetActiveWindow(), WM_CANCELMODE, 0, 0);
|
||||
send_message(get_active_window(), WM_CANCELMODE, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -302,6 +302,13 @@ static inline LRESULT send_message(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lp
|
|||
return NtUserMessageCall(hwnd, msg, wparam, lparam, NULL, NtUserSendMessage, FALSE);
|
||||
}
|
||||
|
||||
static inline HWND get_active_window(void)
|
||||
{
|
||||
GUITHREADINFO info;
|
||||
info.cbSize = sizeof(info);
|
||||
return NtUserGetGUIThreadInfo(GetCurrentThreadId(), &info) ? info.hwndActive : 0;
|
||||
}
|
||||
|
||||
/* registry helpers */
|
||||
|
||||
extern HKEY open_hkcu_key( const char *name ) DECLSPEC_HIDDEN;
|
||||
|
|
|
@ -558,7 +558,7 @@ struct macdrv_thread_data *macdrv_init_thread_data(void)
|
|||
set_queue_display_fd(macdrv_get_event_queue_fd(data->queue));
|
||||
TlsSetValue(thread_data_tls_index, data);
|
||||
|
||||
ActivateKeyboardLayout(data->active_keyboard_layout, 0);
|
||||
NtUserActivateKeyboardLayout(data->active_keyboard_layout, 0);
|
||||
return data;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue