Jelajahi Sumber

X11: Don't reset mouse cursor theme.

On KDE (and possibly others) the "default" cursor theme is actually some system default, not the one you've set in the desktop setting.
This was especially annoying when using a white cursor, as Godot would then reset back to a dark one.
In my case it was also keeping the cursor from changing its shape.

(cherry picked from commit fc84ccc468e14dd8cd317c29424011d76ec85dd5)
Andreas Haas 8 tahun lalu
induk
melakukan
c5c546fb7f
1 mengubah file dengan 1 tambahan dan 2 penghapusan
  1. 1 2
      platform/x11/os_x11.cpp

+ 1 - 2
platform/x11/os_x11.cpp

@@ -338,12 +338,11 @@ void OS_X11::initialize(const VideoMode &p_desired, int p_video_driver, int p_au
 		WARN_PRINT("XCreateIC couldn't create xic");
 		WARN_PRINT("XCreateIC couldn't create xic");
 	}
 	}
 
 
-	XcursorSetTheme(x11_display, "default");
 	cursor_size = XcursorGetDefaultSize(x11_display);
 	cursor_size = XcursorGetDefaultSize(x11_display);
 	cursor_theme = XcursorGetTheme(x11_display);
 	cursor_theme = XcursorGetTheme(x11_display);
 
 
 	if (!cursor_theme) {
 	if (!cursor_theme) {
-		print_line("not found theme");
+		WARN_PRINT("Could not find cursor theme");
 		cursor_theme = "default";
 		cursor_theme = "default";
 	}
 	}