mirror of
https://github.com/labwc/labwc.git
synced 2025-11-01 22:58:47 -04:00
cursor: reload cursor on Reconfigure
This gives instant feedback when changing cursor theme or size. It only works for server side cursors or clients using the cursor-shape protocol. Fixes: #1619
This commit is contained in:
parent
4b6efb7307
commit
8d4f295440
3 changed files with 11 additions and 3 deletions
|
|
@ -299,6 +299,7 @@ cursor_update_image(struct seat *seat)
|
|||
*/
|
||||
if (seat->seat->pointer_state.focused_surface) {
|
||||
seat->server_cursor = LAB_CURSOR_DEFAULT;
|
||||
wlr_cursor_set_xcursor(seat->cursor, seat->xcursor_manager, "");
|
||||
cursor_update_focus(seat->server);
|
||||
}
|
||||
return;
|
||||
|
|
@ -1254,7 +1255,7 @@ cursor_frame(struct wl_listener *listener, void *data)
|
|||
wlr_seat_pointer_notify_frame(seat->seat);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
cursor_load(struct seat *seat)
|
||||
{
|
||||
const char *xcursor_theme = getenv("XCURSOR_THEME");
|
||||
|
|
@ -1300,6 +1301,13 @@ cursor_load(struct seat *seat)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
cursor_reload(struct seat *seat)
|
||||
{
|
||||
cursor_load(seat);
|
||||
cursor_update_image(seat);
|
||||
}
|
||||
|
||||
void
|
||||
cursor_init(struct seat *seat)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue