1
0
Fork 0

backends/x11: Force-update cursor when theme or size changed

Force update the cursor renderer after theme or size changes; otherwise
we'll be stuck with the old theme and/or size until something else
triggers resetting of the cursor.
This commit is contained in:
Jonas Ådahl 2018-06-27 21:30:55 +02:00
parent 0ca3526627
commit 3fbeeb9072
3 changed files with 13 additions and 0 deletions

View file

@ -802,3 +802,13 @@ meta_backend_x11_get_xwindow (MetaBackendX11 *x11)
ClutterActor *stage = meta_backend_get_stage (META_BACKEND (x11));
return clutter_x11_get_stage_window (CLUTTER_STAGE (stage));
}
void
meta_backend_x11_reload_cursor (MetaBackendX11 *x11)
{
MetaBackend *backend = META_BACKEND (x11);
MetaCursorRenderer *cursor_renderer =
meta_backend_get_cursor_renderer (backend);
meta_cursor_renderer_force_update (cursor_renderer);
}

View file

@ -57,4 +57,6 @@ void meta_backend_x11_handle_event (MetaBackendX11 *x11,
uint8_t meta_backend_x11_get_xkb_event_base (MetaBackendX11 *x11);
void meta_backend_x11_reload_cursor (MetaBackendX11 *x11);
#endif /* META_BACKEND_X11_H */

View file

@ -1512,6 +1512,7 @@ update_cursor_theme (MetaX11Display *x11_display)
Display *xdisplay = meta_backend_x11_get_xdisplay (backend_x11);
set_cursor_theme (xdisplay);
meta_backend_x11_reload_cursor (backend_x11);
}
}