From 2fea2c846689d3810def93e6e0e6eeb01c2ef718 Mon Sep 17 00:00:00 2001 From: Pablo Barciela Date: Mon, 4 Dec 2017 01:01:52 +0100 Subject: WidthOfScreen and HeightOfScreen implementation This commit reverts: https://github.com/mate-desktop/caja/commit/4c130e22b98bbc1a85747adac3b582e45d34514e https://github.com/mate-desktop/caja/commit/ac12e6d16f4a51b3327d013781e72cfec17f3624 https://github.com/mate-desktop/caja/commit/17b3c0ca924ffcd4bd06fded98227eba626d4f0b https://github.com/mate-desktop/caja/commit/42c8d2c3373c25d6e321be6950997c0d7ce44279 And it applies an alternative to fix the deprecated functions: gdk_screen_get_width gdk_screen_get_height gdk_screen_width gdk_screen_height --- src/file-manager/fm-desktop-icon-view.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/file-manager/fm-desktop-icon-view.c') 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); -- cgit v1.2.1