summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorwb9688 <[email protected]>2020-12-05 16:11:24 +0100
committerraveit65 <[email protected]>2020-12-11 14:10:41 +0100
commita23d153102cfcba1079e68b43cf1abc607f65cb5 (patch)
tree821c697a67212c61bf977a0295c7197c3dca0a13 /shell
parent75762f3445644da1e803eebe77a7dff1abdc3103 (diff)
downloadatril-a23d153102cfcba1079e68b43cf1abc607f65cb5.tar.bz2
atril-a23d153102cfcba1079e68b43cf1abc607f65cb5.tar.xz
Support non-X11 windowing systems
Diffstat (limited to 'shell')
-rw-r--r--shell/ev-application.c16
-rw-r--r--shell/main.c2
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);