diff options
author | wb9688 <[email protected]> | 2020-12-05 16:11:24 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2020-12-11 14:10:41 +0100 |
commit | a23d153102cfcba1079e68b43cf1abc607f65cb5 (patch) | |
tree | 821c697a67212c61bf977a0295c7197c3dca0a13 /shell/ev-application.c | |
parent | 75762f3445644da1e803eebe77a7dff1abdc3103 (diff) | |
download | atril-a23d153102cfcba1079e68b43cf1abc607f65cb5.tar.bz2 atril-a23d153102cfcba1079e68b43cf1abc607f65cb5.tar.xz |
Support non-X11 windowing systems
Diffstat (limited to 'shell/ev-application.c')
-rw-r--r-- | shell/ev-application.c | 16 |
1 files changed, 10 insertions, 6 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)); } |