summaryrefslogtreecommitdiff
path: root/eel/eel-background.c
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2018-03-29 16:09:16 -0400
committerlukefromdc <[email protected]>2018-04-04 21:53:21 -0400
commitef78aa3fe9043d256f269b4aa25234e42b9eecae (patch)
tree53c4185c0857e159d610c92eca71eee9698177c4 /eel/eel-background.c
parentcfd502157420406aa56a6b5319f0bd8dc90df8e4 (diff)
downloadcaja-ef78aa3fe9043d256f269b4aa25234e42b9eecae.tar.bz2
caja-ef78aa3fe9043d256f269b4aa25234e42b9eecae.tar.xz
Scale screen dimensions
Diffstat (limited to 'eel/eel-background.c')
-rw-r--r--eel/eel-background.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/eel/eel-background.c b/eel/eel-background.c
index e9b4b2cf..02b4d857 100644
--- a/eel/eel-background.c
+++ b/eel/eel-background.c
@@ -308,8 +308,9 @@ drawable_get_adjusted_size (EelBackground *self,
if (self->details->is_desktop)
{
GdkScreen *screen = gtk_widget_get_screen (self->details->widget);
- *width = WidthOfScreen (gdk_x11_screen_get_xscreen (screen));
- *height = HeightOfScreen (gdk_x11_screen_get_xscreen (screen));
+ gint scale = gtk_widget_get_scale_factor (self->details->widget);
+ *width = WidthOfScreen (gdk_x11_screen_get_xscreen (screen)) / scale;
+ *height = HeightOfScreen (gdk_x11_screen_get_xscreen (screen)) / scale;
}
else
{