summaryrefslogtreecommitdiff
path: root/libcaja-private/caja-icon-container.c
diff options
context:
space:
mode:
authorZenWalker <[email protected]>2017-08-11 16:52:57 +0200
committerlukefromdc <[email protected]>2017-08-12 22:16:28 -0400
commit42c8d2c3373c25d6e321be6950997c0d7ce44279 (patch)
tree9eb8112ce7dd51b0073ea7521770c372b26d1039 /libcaja-private/caja-icon-container.c
parent17b3c0ca924ffcd4bd06fded98227eba626d4f0b (diff)
downloadcaja-42c8d2c3373c25d6e321be6950997c0d7ce44279.tar.bz2
caja-42c8d2c3373c25d6e321be6950997c0d7ce44279.tar.xz
avoid deprecated gdk_screen_width/height
Diffstat (limited to 'libcaja-private/caja-icon-container.c')
-rw-r--r--libcaja-private/caja-icon-container.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/libcaja-private/caja-icon-container.c b/libcaja-private/caja-icon-container.c
index c37a0d1a..aaff045c 100644
--- a/libcaja-private/caja-icon-container.c
+++ b/libcaja-private/caja-icon-container.c
@@ -326,6 +326,7 @@ icon_set_position (CajaIcon *icon,
int item_width, item_height;
int height_above, width_left;
int min_x, max_x, min_y, max_y;
+ int sc_width, sc_height;
if (icon->x == x && icon->y == y)
{
@@ -354,12 +355,16 @@ icon_set_position (CajaIcon *icon,
For now, we have a cheesy workaround:
*/
+
+ gdk_window_get_geometry (gdk_screen_get_root_window (gdk_screen_get_default()),
+ NULL, NULL, &sc_width, &sc_height);
+
container_x = 0;
container_y = 0;
- container_width = gdk_screen_width () - container_x
+ container_width = sc_width - container_x
- container->details->left_margin
- container->details->right_margin;
- container_height = gdk_screen_height () - container_y
+ container_height = sc_height - container_y
- container->details->top_margin
- container->details->bottom_margin;
pixels_per_unit = EEL_CANVAS (container)->pixels_per_unit;