diff options
| author | Nikita Ivanov <nikita.vyach.ivanov@gmail.com> | 2023-07-23 04:17:11 +0200 |
|---|---|---|
| committer | Nikita Ivanov <nikita.vyach.ivanov@gmail.com> | 2023-07-23 04:19:04 +0200 |
| commit | 6cd6409ba2a484170bb6fb1c1282635dd6078e28 (patch) | |
| tree | de6020babe6c890893b94e279905a388b3d284a0 | |
| parent | 416cbdf29d63673713e06d9bd62d941c14e726f3 (diff) | |
| download | dwlb-6cd6409ba2a484170bb6fb1c1282635dd6078e28.tar.gz | |
Revert, sometimes the cursor icon is incorrect
This reverts commit 62bd47f220531ed5db65bd9937e852e06bd39a53.
| -rw-r--r-- | dwlb.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -589,6 +589,18 @@ pointer_enter(void *data, struct wl_pointer *pointer, break; } } + + if (!cursor_image) { + struct wl_cursor_theme *cursor_theme = wl_cursor_theme_load(NULL, 24 * buffer_scale, shm); + cursor_image = wl_cursor_theme_get_cursor(cursor_theme, "left_ptr")->images[0]; + cursor_surface = wl_compositor_create_surface(compositor); + wl_surface_set_buffer_scale(cursor_surface, buffer_scale); + wl_surface_attach(cursor_surface, wl_cursor_image_get_buffer(cursor_image), 0, 0); + wl_surface_commit(cursor_surface); + } + wl_pointer_set_cursor(pointer, serial, cursor_surface, + cursor_image->hotspot_x, + cursor_image->hotspot_y); } static void |