diff options
author | ZenWalker <[email protected]> | 2017-08-07 02:56:30 +0200 |
---|---|---|
committer | lukefromdc <[email protected]> | 2017-08-12 22:16:28 -0400 |
commit | 17b3c0ca924ffcd4bd06fded98227eba626d4f0b (patch) | |
tree | 089be8a53def688e8dea11c48b00c16a34111d7f /src/file-manager/fm-desktop-icon-view.c | |
parent | 6c51a333e80df22587df4d9e0e2789fd1289d728 (diff) | |
download | caja-17b3c0ca924ffcd4bd06fded98227eba626d4f0b.tar.bz2 caja-17b3c0ca924ffcd4bd06fded98227eba626d4f0b.tar.xz |
avoid deprecated gdk_screen_get_width/height
Diffstat (limited to 'src/file-manager/fm-desktop-icon-view.c')
-rw-r--r-- | src/file-manager/fm-desktop-icon-view.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/file-manager/fm-desktop-icon-view.c b/src/file-manager/fm-desktop-icon-view.c index a327ac9c..05cb59ac 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; - screen_width = gdk_screen_get_width (screen); - screen_height = gdk_screen_get_height (screen); + gdk_window_get_geometry (gdk_screen_get_root_window (screen), NULL, NULL, + &screen_width, &screen_height); for (i = 0; i < n_items; i += 4) { @@ -442,8 +442,10 @@ realized_callback (GtkWidget *widget, FMDesktopIconView *desktop_icon_view) */ allocation.x = 0; allocation.y = 0; - allocation.width = gdk_screen_get_width (screen); - allocation.height = gdk_screen_get_height (screen); + + gdk_window_get_geometry (gdk_screen_get_root_window (screen), NULL, NULL, + &allocation.width, &allocation.height); + gtk_widget_size_allocate (GTK_WIDGET(get_icon_container(desktop_icon_view)), &allocation); |