Use GSettings for a new native window toggle

Also, redo desktop files handling.
This commit is contained in:
2022-07-25 14:25:14 +02:00
parent eca319e5e4
commit dcc5b6c719
5 changed files with 54 additions and 12 deletions

View File

@@ -547,7 +547,9 @@ fiv_view_realize(GtkWidget *widget)
//
// If GTK+'s OpenGL integration fails to deliver, we need to use the window
// directly, sidestepping the toolkit entirely.
if (GDK_IS_X11_WINDOW(window))
GSettings *settings = g_settings_new(PROJECT_NS PROJECT_NAME);
if (GDK_IS_X11_WINDOW(window) &&
g_settings_get_boolean(settings, "native-view-window"))
gdk_window_ensure_native(window);
#endif // GDK_WINDOWING_X11