Commit 1b987bfd authored by Alexandros Frantzis's avatar Alexandros Frantzis Committed by Alexandre Julliard

winewayland.drv: Implement SetCursor using cursor bitmap data.

Set the cursor image used for Wayland surfaces by using the Windows cursor bitmap data.
parent b8b90e40
......@@ -126,7 +126,10 @@ void wayland_surface_destroy(struct wayland_surface *surface)
{
pthread_mutex_lock(&process_wayland.pointer.mutex);
if (process_wayland.pointer.focused_hwnd == surface->hwnd)
{
process_wayland.pointer.focused_hwnd = NULL;
process_wayland.pointer.enter_serial = 0;
}
pthread_mutex_unlock(&process_wayland.pointer.mutex);
pthread_mutex_lock(&xdg_data_mutex);
......
......@@ -56,10 +56,19 @@ enum wayland_window_message
WM_WAYLAND_INIT_DISPLAY_DEVICES = 0x80001000
};
struct wayland_cursor
{
struct wayland_shm_buffer *shm_buffer;
struct wl_surface *wl_surface;
int hotspot_x, hotspot_y;
};
struct wayland_pointer
{
struct wl_pointer *wl_pointer;
HWND focused_hwnd;
uint32_t enter_serial;
struct wayland_cursor cursor;
pthread_mutex_t mutex;
};
......@@ -204,6 +213,7 @@ RGNDATA *get_region_data(HRGN region) DECLSPEC_HIDDEN;
LRESULT WAYLAND_DesktopWindowProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) DECLSPEC_HIDDEN;
void WAYLAND_DestroyWindow(HWND hwnd) DECLSPEC_HIDDEN;
void WAYLAND_SetCursor(HWND hwnd, HCURSOR hcursor) DECLSPEC_HIDDEN;
BOOL WAYLAND_UpdateDisplayDevices(const struct gdi_device_manager *device_manager,
BOOL force, void *param) DECLSPEC_HIDDEN;
LRESULT WAYLAND_WindowMessage(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) DECLSPEC_HIDDEN;
......
......@@ -33,6 +33,7 @@ static const struct user_driver_funcs waylanddrv_funcs =
{
.pDesktopWindowProc = WAYLAND_DesktopWindowProc,
.pDestroyWindow = WAYLAND_DestroyWindow,
.pSetCursor = WAYLAND_SetCursor,
.pUpdateDisplayDevices = WAYLAND_UpdateDisplayDevices,
.pWindowMessage = WAYLAND_WindowMessage,
.pWindowPosChanged = WAYLAND_WindowPosChanged,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment