screen: Crash when we can't load a cursor
To make it easier for users to understand why their cursor disappeared.
This commit is contained in:
parent
cd4206764e
commit
5ad15bb5e5
@ -1262,9 +1262,11 @@ meta_screen_update_cursor (MetaScreen *screen)
|
|||||||
MetaCursorTracker *tracker = meta_cursor_tracker_get_for_screen (screen);
|
MetaCursorTracker *tracker = meta_cursor_tracker_get_for_screen (screen);
|
||||||
|
|
||||||
cursor_ref = meta_cursor_reference_from_theme (cursor);
|
cursor_ref = meta_cursor_reference_from_theme (cursor);
|
||||||
|
if (cursor_ref == NULL)
|
||||||
|
g_fatal ("Could not find cursor. Perhaps set XCURSOR_PATH?");
|
||||||
|
|
||||||
meta_cursor_tracker_set_root_cursor (tracker, cursor_ref);
|
meta_cursor_tracker_set_root_cursor (tracker, cursor_ref);
|
||||||
if (cursor_ref)
|
meta_cursor_reference_unref (cursor_ref);
|
||||||
meta_cursor_reference_unref (cursor_ref);
|
|
||||||
|
|
||||||
/* Set a cursor for X11 applications that don't specify their own */
|
/* Set a cursor for X11 applications that don't specify their own */
|
||||||
xcursor = meta_display_create_x_cursor (display, cursor);
|
xcursor = meta_display_create_x_cursor (display, cursor);
|
||||||
|
Loading…
Reference in New Issue
Block a user