From 2a6870b21fa1b633014b56782c2c1a12a534610b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 16 Jun 2024 15:01:46 +0530 Subject: [PATCH] Wayland labwc: Fix kitty timing out waiting for compositor to quit fucking around with scales on labwc labwc is unique among Wayland compositors in implementing fractional scale but not preferred integer buffer scale events. We didn't cater to this particular combination of before. And to top it off it appears to have no way for the user to set/control the scale so I cant even test what it will do with fractional scales other than 1. Sigh. As with all things Wayland, you need to be a masochist to subject yourself to them. Fixes #7540 --- docs/changelog.rst | 2 ++ glfw/wl_window.c | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index e3f09152a..8f45ada44 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -61,6 +61,8 @@ Detailed list of changes - Wayland: Fix regression in 0.34.0 causing flickering on window resize on NVIDIA drivers (:iss:`7493`) +- Wayland labwc: Fix kitty timing out waiting for compositor to quit fucking around with scales on labwc (:iss:`7540`) + 0.35.1 [2024-05-31] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/glfw/wl_window.c b/glfw/wl_window.c index 93362910a..fb0cf1532 100644 --- a/glfw/wl_window.c +++ b/glfw/wl_window.c @@ -549,7 +549,10 @@ fractional_scale_preferred_scale(void *data, struct wp_fractional_scale_v1 *wp_f debug("Fractional scale requested: %u/120 = %.2f for window %llu\n", scale, scale / 120., window->id); window->wl.fractional_scale = scale; // Hyprland sends a fraction scale = 1 event before configuring the xdg surface and then another after with the correct scale - window->wl.window_fully_created = window->wl.once.surface_configured || scale != 120; + // labwc doesnt support preferred buffer scale, so we assume it's done fucking around with scales even if the scale is 120 + // As far as I can tell from googling labwc has no way to specify scales other + // than 1 anyway, so no way to test what it will do in such cases. Sigh, more half baked Wayland shit. + window->wl.window_fully_created = window->wl.once.surface_configured || scale != 120 || !_glfw.wl.has_preferred_buffer_scale; apply_scale_changes(window, true, true); }