summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryangxiaojuan <[email protected]>2023-06-27 15:56:18 +0800
committerLuke from DC <[email protected]>2023-06-29 05:45:50 +0000
commite0901e736a7a7d461dd1b291e591fb729de738b8 (patch)
tree31f0d86646c78c1e39d5deb5b33862aaafde6774
parent3bf4808debb94fa832897e382d6e67a4be6eb1aa (diff)
downloadcaja-e0901e736a7a7d461dd1b291e591fb729de738b8.tar.bz2
caja-e0901e736a7a7d461dd1b291e591fb729de738b8.tar.xz
caja-desktop-window: Fix the xrandr error
fix https://github.com/mate-desktop/caja/issues/1069
-rw-r--r--src/caja-desktop-window.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/caja-desktop-window.c b/src/caja-desktop-window.c
index 061b11b7..bb31b2c6 100644
--- a/src/caja-desktop-window.c
+++ b/src/caja-desktop-window.c
@@ -155,12 +155,9 @@ caja_desktop_window_screen_size_changed (GdkScreen *screen,
CajaDesktopWindow *window)
{
int width_request, height_request;
- int scale;
-
- scale = gdk_window_get_scale_factor (gdk_screen_get_root_window (screen));
- width_request = WidthOfScreen (gdk_x11_screen_get_xscreen (screen)) / scale;
- height_request = HeightOfScreen (gdk_x11_screen_get_xscreen (screen)) / scale;
+ width_request = gdk_screen_get_width(screen);
+ height_request = gdk_screen_get_height(screen);
g_object_set (window,
"width_request", width_request,