summaryrefslogtreecommitdiff
path: root/libview
diff options
context:
space:
mode:
Diffstat (limited to 'libview')
-rw-r--r--libview/ev-view-presentation.c10
-rw-r--r--libview/ev-view.c10
2 files changed, 14 insertions, 6 deletions
diff --git a/libview/ev-view-presentation.c b/libview/ev-view-presentation.c
index 74ce60ee..40dea3ea 100644
--- a/libview/ev-view-presentation.c
+++ b/libview/ev-view-presentation.c
@@ -720,12 +720,16 @@ ev_view_presentation_goto_window_send_key_event (EvViewPresentation *pview,
{
GdkEventKey *new_event;
GdkScreen *screen;
+ gint sc_width;
+ gint sc_height;
/* Move goto window off screen */
screen = gtk_widget_get_screen (GTK_WIDGET (pview));
- gtk_window_move (GTK_WINDOW (pview->goto_window),
- gdk_screen_get_width (screen) + 1,
- gdk_screen_get_height (screen) + 1);
+
+ gdk_window_get_geometry (gdk_screen_get_root_window (screen), NULL, NULL,
+ &sc_width, &sc_height);
+
+ gtk_window_move (GTK_WINDOW (pview->goto_window), sc_width + 1, sc_height + 1);
gtk_widget_show (pview->goto_window);
new_event = (GdkEventKey *) gdk_event_copy (event);
diff --git a/libview/ev-view.c b/libview/ev-view.c
index 2007dd56..2340d0a9 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -4449,15 +4449,19 @@ show_loading_window_cb (EvView *view)
if (!view->loading_window) {
GtkWindow *parent;
GdkScreen *screen;
+ gint sc_width;
+ gint sc_height;
parent = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (view)));
view->loading_window = ev_loading_window_new (parent);
/* Show the window off screen to get a valid size asap */
screen = gtk_widget_get_screen (GTK_WIDGET (view));
- gtk_window_move (GTK_WINDOW (view->loading_window),
- gdk_screen_get_width (screen) + 1,
- gdk_screen_get_height (screen) + 1);
+
+ gdk_window_get_geometry (gdk_screen_get_root_window (screen), NULL, NULL,
+ &sc_width, &sc_height);
+
+ gtk_window_move (GTK_WINDOW (view->loading_window), sc_width + 1, sc_height + 1);
gtk_widget_show (view->loading_window);
}