Wayland: wl_cursor_theme_load() may return NULL
This commit is contained in:
parent
02c7ee5128
commit
0394a27074
@ -1227,7 +1227,10 @@ void Fl_Wayland_Screen_Driver::close_display() {
|
||||
}
|
||||
wl_subcompositor_destroy(wl_subcompositor); wl_subcompositor = NULL;
|
||||
wl_surface_destroy(seat->cursor_surface); seat->cursor_surface = NULL;
|
||||
wl_cursor_theme_destroy(seat->cursor_theme); seat->cursor_theme = NULL;
|
||||
if (seat->cursor_theme) {
|
||||
wl_cursor_theme_destroy(seat->cursor_theme);
|
||||
seat->cursor_theme = NULL;
|
||||
}
|
||||
wl_compositor_destroy(wl_compositor); wl_compositor = NULL;
|
||||
wl_shm_destroy(wl_shm); wl_shm = NULL;
|
||||
if (seat->wl_keyboard) {
|
||||
|
@ -1330,7 +1330,7 @@ void Fl_Wayland_Window_Driver::resize_after_screen_change(void *data) {
|
||||
int Fl_Wayland_Window_Driver::set_cursor(Fl_Cursor c) {
|
||||
Fl_Wayland_Screen_Driver *scr_driver = (Fl_Wayland_Screen_Driver*)Fl::screen_driver();
|
||||
struct wld_window *xid = (struct wld_window *)Fl_Window_Driver::xid(pWindow);
|
||||
|
||||
if (!scr_driver->seat->cursor_theme) return 1;
|
||||
// Cursor names are the files of directory /usr/share/icons/XXXX/cursors/
|
||||
// where XXXX is the name of the current 'cursor theme'.
|
||||
switch (c) {
|
||||
|
Loading…
Reference in New Issue
Block a user