diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/caja-desktop-window.c | 8 | ||||
-rw-r--r-- | src/caja-window.c | 14 | ||||
-rw-r--r-- | src/file-manager/fm-desktop-icon-view.c | 10 |
3 files changed, 10 insertions, 22 deletions
diff --git a/src/caja-desktop-window.c b/src/caja-desktop-window.c index 3bb72095..a0a71a27 100644 --- a/src/caja-desktop-window.c +++ b/src/caja-desktop-window.c @@ -115,8 +115,8 @@ caja_desktop_window_screen_size_changed (GdkScreen *screen, { int width_request, height_request; - gdk_window_get_geometry (gdk_screen_get_root_window (screen), NULL, NULL, - &width_request, &height_request); + width_request = WidthOfScreen (gdk_x11_screen_get_xscreen (screen)); + height_request = HeightOfScreen (gdk_x11_screen_get_xscreen (screen)); g_object_set (window, "width_request", width_request, @@ -131,8 +131,8 @@ caja_desktop_window_new (CajaApplication *application, CajaDesktopWindow *window; int width_request, height_request; - gdk_window_get_geometry (gdk_screen_get_root_window (screen), NULL, NULL, - &width_request, &height_request); + width_request = WidthOfScreen (gdk_x11_screen_get_xscreen (screen)); + height_request = HeightOfScreen (gdk_x11_screen_get_xscreen (screen)); window = CAJA_DESKTOP_WINDOW (gtk_widget_new (caja_desktop_window_get_type(), diff --git a/src/caja-window.c b/src/caja-window.c index f820a20b..10e71b35 100644 --- a/src/caja-window.c +++ b/src/caja-window.c @@ -516,12 +516,7 @@ caja_window_zoom_to_default (CajaWindow *window) static guint get_max_forced_height (GdkScreen *screen) { - gint height; - - gdk_window_get_geometry (gdk_screen_get_root_window (screen), NULL, NULL, - NULL, &height); - - return (height * 90) / 100; + return (HeightOfScreen (gdk_x11_screen_get_xscreen (screen)) * 90) / 100; } /* Code should never force the window wider than this size. @@ -530,12 +525,7 @@ get_max_forced_height (GdkScreen *screen) static guint get_max_forced_width (GdkScreen *screen) { - gint width; - - gdk_window_get_geometry (gdk_screen_get_root_window (screen), NULL, NULL, - &width, NULL); - - return (width * 90) / 100; + return (WidthOfScreen (gdk_x11_screen_get_xscreen (screen)) * 90) / 100; } /* This must be called when construction of CajaWindow is finished, diff --git a/src/file-manager/fm-desktop-icon-view.c b/src/file-manager/fm-desktop-icon-view.c index 05cb59ac..668c4300 100644 --- a/src/file-manager/fm-desktop-icon-view.c +++ b/src/file-manager/fm-desktop-icon-view.c @@ -119,8 +119,8 @@ icon_container_set_workarea (CajaIconContainer *icon_container, left = right = top = bottom = 0; - gdk_window_get_geometry (gdk_screen_get_root_window (screen), NULL, NULL, - &screen_width, &screen_height); + screen_width = WidthOfScreen (gdk_x11_screen_get_xscreen (screen)); + screen_height = HeightOfScreen (gdk_x11_screen_get_xscreen (screen)); for (i = 0; i < n_items; i += 4) { @@ -442,10 +442,8 @@ realized_callback (GtkWidget *widget, FMDesktopIconView *desktop_icon_view) */ allocation.x = 0; allocation.y = 0; - - gdk_window_get_geometry (gdk_screen_get_root_window (screen), NULL, NULL, - &allocation.width, &allocation.height); - + allocation.width = WidthOfScreen (gdk_x11_screen_get_xscreen (screen)); + allocation.height = HeightOfScreen (gdk_x11_screen_get_xscreen (screen)); gtk_widget_size_allocate (GTK_WIDGET(get_icon_container(desktop_icon_view)), &allocation); |