Compare commits

...

1 Commits

Author SHA1 Message Date
Jehan
b24407e51f gdk: Wayland output done() listener not scale factor aware.
As can be seen on other Wayland handlers, GdkWaylandMonitor width and
height are in device pixels whereas we are saving GdkMonitor size in
application pixels.
2020-06-22 09:06:38 +02:00

View File

@@ -2379,12 +2379,17 @@ output_handle_done (void *data,
struct wl_output *wl_output)
{
GdkWaylandMonitor *monitor = (GdkWaylandMonitor *)data;
int scale;
GDK_NOTE (MISC,
g_message ("handle done output %d", monitor->id));
monitor->wl_output_done = TRUE;
scale = gdk_monitor_get_scale_factor (GDK_MONITOR (monitor));
monitor->width = monitor->width / scale;
monitor->height = monitor->height / scale;
if (!should_expect_xdg_output_done (monitor) || monitor->xdg_output_done)
apply_monitor_change (monitor);
}