diff options
-rw-r--r-- | src/gs-manager.c | 6 | ||||
-rw-r--r-- | src/gs-window-x11.c | 13 | ||||
-rw-r--r-- | src/mate-screensaver-preferences.c | 6 |
3 files changed, 20 insertions, 5 deletions
diff --git a/src/gs-manager.c b/src/gs-manager.c index 34e1f1f..03ee338 100644 --- a/src/gs-manager.c +++ b/src/gs-manager.c @@ -1320,8 +1320,10 @@ apply_background_to_window (GSManager *manager, display = gs_window_get_display (window); screen = gdk_display_get_default_screen (display); - width = gdk_screen_get_width (screen); - height = gdk_screen_get_height (screen); + + gdk_window_get_geometry (gdk_screen_get_root_window (screen), NULL, NULL, + &width, &height); + gs_debug ("Creating background w:%d h:%d", width, height); surface = mate_bg_create_surface (manager->priv->bg, gs_window_get_gdk_window (window), diff --git a/src/gs-window-x11.c b/src/gs-window-x11.c index dbdb469..edc36a4 100644 --- a/src/gs-window-x11.c +++ b/src/gs-window-x11.c @@ -1272,8 +1272,12 @@ create_keyboard_socket (GSWindow *window, guint32 id) { int height; + int sc_height; - height = (gdk_screen_get_height (gtk_widget_get_screen (GTK_WIDGET (window)))) / 4; + gdk_window_get_geometry (gdk_screen_get_root_window (gtk_widget_get_screen (GTK_WIDGET (window))), + NULL, NULL, NULL, &sc_height); + + height = sc_height / 4; window->priv->keyboard_socket = gtk_socket_new (); gtk_widget_set_size_request (window->priv->keyboard_socket, -1, height); @@ -2162,12 +2166,17 @@ gs_window_real_motion_notify_event (GtkWidget *widget, gdouble min_percentage = 0.1; GdkDisplay *display; GdkScreen *screen; + gint sc_width; window = GS_WINDOW (widget); display = gs_window_get_display (window); screen = gdk_display_get_default_screen (display); - min_distance = gdk_screen_get_width (screen) * min_percentage; + + gdk_window_get_geometry (gdk_screen_get_root_window (screen), NULL, NULL, + &sc_width, NULL); + + min_distance = sc_width * min_percentage; /* if the last position was not set then don't detect motion */ if (window->priv->last_x < 0 || window->priv->last_y < 0) diff --git a/src/mate-screensaver-preferences.c b/src/mate-screensaver-preferences.c index a3ba973..d3a11a7 100644 --- a/src/mate-screensaver-preferences.c +++ b/src/mate-screensaver-preferences.c @@ -1215,9 +1215,13 @@ constrain_list_size (GtkWidget *widget, { GtkRequisition req; int max_height; + int sc_height; /* constrain height to be the tree height up to a max */ - max_height = (gdk_screen_get_height (gtk_widget_get_screen (widget))) / 4; + gdk_window_get_geometry (gdk_screen_get_root_window (gtk_widget_get_screen (widget)), + NULL, NULL, NULL, &sc_height); + + max_height = sc_height / 4; gtk_widget_get_preferred_size (to_size, &req, NULL); allocation->height = MIN (req.height, max_height); |