mirror of
https://github.com/labwc/labwc.git
synced 2026-04-01 07:15:52 -04:00
wlroots: changes in wlr_xwayland_set_cursor
Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com>
This commit is contained in:
parent
79daa218a9
commit
5fb09915c5
1 changed files with 6 additions and 19 deletions
|
|
@ -1200,10 +1200,9 @@ xwayland_server_init(struct server *server, struct wlr_compositor *compositor)
|
||||||
server->seat.xcursor_manager, XCURSOR_DEFAULT, 1);
|
server->seat.xcursor_manager, XCURSOR_DEFAULT, 1);
|
||||||
if (xcursor) {
|
if (xcursor) {
|
||||||
struct wlr_xcursor_image *image = xcursor->images[0];
|
struct wlr_xcursor_image *image = xcursor->images[0];
|
||||||
wlr_xwayland_set_cursor(server->xwayland, image->buffer,
|
struct wlr_buffer *cursor_buffer = wlr_xcursor_image_get_buffer(image);
|
||||||
image->width * 4, image->width,
|
wlr_xwayland_set_cursor(server->xwayland, cursor_buffer,
|
||||||
image->height, image->hotspot_x,
|
image->hotspot_x, image->hotspot_y);
|
||||||
image->hotspot_y);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1238,23 +1237,11 @@ xwayland_reset_cursor(struct server *server)
|
||||||
if (xcursor && !server->xwayland->xwm) {
|
if (xcursor && !server->xwayland->xwm) {
|
||||||
/* Prevents setting the cursor on an active xwayland server */
|
/* Prevents setting the cursor on an active xwayland server */
|
||||||
struct wlr_xcursor_image *image = xcursor->images[0];
|
struct wlr_xcursor_image *image = xcursor->images[0];
|
||||||
wlr_xwayland_set_cursor(server->xwayland, image->buffer,
|
struct wlr_buffer *cursor_buffer = wlr_xcursor_image_get_buffer(image);
|
||||||
image->width * 4, image->width,
|
wlr_xwayland_set_cursor(server->xwayland, cursor_buffer,
|
||||||
image->height, image->hotspot_x,
|
image->hotspot_x, image->hotspot_y);
|
||||||
image->hotspot_y);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (server->xwayland->cursor) {
|
|
||||||
/*
|
|
||||||
* The previous configured theme has set the
|
|
||||||
* default cursor or the xwayland server is
|
|
||||||
* currently running but still has a cached
|
|
||||||
* xcursor set that will be used on the next
|
|
||||||
* xwayland destroy -> lazy startup cycle.
|
|
||||||
*/
|
|
||||||
zfree(server->xwayland->cursor);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue