From a23d153102cfcba1079e68b43cf1abc607f65cb5 Mon Sep 17 00:00:00 2001 From: wb9688 Date: Sat, 5 Dec 2020 16:11:24 +0100 Subject: Support non-X11 windowing systems --- shell/ev-application.c | 16 ++++++++++------ shell/main.c | 2 -- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/shell/ev-application.c b/shell/ev-application.c index 6307c7fe..8cff194f 100644 --- a/shell/ev-application.c +++ b/shell/ev-application.c @@ -606,9 +606,11 @@ ev_application_open_uri_in_window (EvApplication *application, gdk_window = gtk_widget_get_window (GTK_WIDGET (ev_window)); - if (timestamp <= 0) - timestamp = gdk_x11_get_server_time (gdk_window); - gdk_x11_window_set_user_time (gdk_window, timestamp); + if (GDK_IS_X11_WINDOW (gdk_window)) { + if (timestamp <= 0) + timestamp = gdk_x11_get_server_time (gdk_window); + gdk_x11_window_set_user_time (gdk_window, timestamp); + } gtk_window_present (GTK_WINDOW (ev_window)); } @@ -697,9 +699,11 @@ ev_application_open_window (EvApplication *application, gdk_window = gtk_widget_get_window (GTK_WIDGET (new_window)); - if (timestamp <= 0) - timestamp = gdk_x11_get_server_time (gdk_window); - gdk_x11_window_set_user_time (gdk_window, timestamp); + if (GDK_IS_X11_WINDOW (gdk_window)) { + if (timestamp <= 0) + timestamp = gdk_x11_get_server_time (gdk_window); + gdk_x11_window_set_user_time (gdk_window, timestamp); + } gtk_window_present (GTK_WINDOW (new_window)); } diff --git a/shell/main.c b/shell/main.c index d85876be..7a4658be 100644 --- a/shell/main.c +++ b/shell/main.c @@ -233,8 +233,6 @@ main (int argc, char *argv[]) textdomain (GETTEXT_PACKAGE); #endif - gdk_set_allowed_backends ("x11"); - context = g_option_context_new (N_("MATE Document Viewer")); g_option_context_set_translation_domain(context, GETTEXT_PACKAGE); g_option_context_add_main_entries (context, goption_options, GETTEXT_PACKAGE); -- cgit v1.2.1