backends/x11: Avoid defining (and freeing!) nonexistent cursors
Such as "default" for legacy X11 themes.
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3454
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3718>
(cherry picked from commit 847f015017
)
This commit is contained in:
parent
df93ce4524
commit
c1f03eba73
1 changed files with 7 additions and 4 deletions
|
@ -108,11 +108,14 @@ meta_cursor_renderer_x11_update_cursor (MetaCursorRenderer *renderer,
|
|||
Cursor xcursor;
|
||||
|
||||
xcursor = create_x_cursor (xdisplay, cursor);
|
||||
XDefineCursor (xdisplay, xwindow, xcursor);
|
||||
XFlush (xdisplay);
|
||||
XFreeCursor (xdisplay, xcursor);
|
||||
if (xcursor)
|
||||
{
|
||||
XDefineCursor (xdisplay, xwindow, xcursor);
|
||||
XFlush (xdisplay);
|
||||
XFreeCursor (xdisplay, xcursor);
|
||||
|
||||
has_server_cursor = TRUE;
|
||||
has_server_cursor = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue