Commit cb63878b authored by Matthias Clasen's avatar Matthias Clasen
Browse files

Merge branch 'issue1901-gtk4' into 'master'

wayland: Use scale from core wl_output protocol

Closes #1901

See merge request !870
parents d0137ef6 713fceb1
Pipeline #83419 passed with stages
in 23 minutes and 4 seconds
......@@ -2357,16 +2357,18 @@ output_handle_scale (void *data,
g_message ("handle scale output %d, scale %d", monitor->id, scale));
if (monitor_has_xdg_output (monitor))
gdk_monitor_get_geometry (GDK_MONITOR (monitor), &previous_geometry);
previous_scale = gdk_monitor_get_scale_factor (GDK_MONITOR (monitor));
/* Set the scale from wl_output protocol, regardless of xdg-output support */
gdk_monitor_set_scale_factor (GDK_MONITOR (monitor), scale);
if (monitor_has_xdg_output (monitor))
width = previous_geometry.width * previous_scale;
height = previous_geometry.height * previous_scale;
gdk_monitor_set_scale_factor (GDK_MONITOR (monitor), scale);
monitor->width = width / scale;
monitor->height = height / scale;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment