Repository navigation
Blurry UI / wrong scaling after switching displays #17150
Unanswered
MDrueke
asked this question in
Bugs - Other
Replies: 1 comment
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hyprland version
v0.56.2
Is this a regression?
Maybe a gap in the fix for #6560, which added "send enter events on late wl_output binds".
What's the bug?
I use a laptop that I connect to an external dock, which has an external monitor connected. I configured my laptop to switch off the internal screen once connected. After disconnecting, GTK3 apps on the internal screen look blurry.
I used AI to debug this (hope you guys don't get too upset). In my own words:
Upon disconnect, the window never gets wl_surface.enter for it again. GTK3 apps then stay at buffer scale 1 and look blurry until they're restarted or moved to another monitor and back.
Cause:
In CWLSurfaceResource::leave() (src/protocols/core/Compositor.cpp), the "Cannot leave surface …, client hasn't bound the output" early return happens before std::erase(m_enteredOutputs, monitor). The monitor stays in the list. When it returns, the late-bind code in Output.cpp calls enter(), which returns at once because the monitor is "already entered."
Evidence:
After moving the window to a headless output, Hyprland sent wl_surface.leave for the returned panel output, which the client had never entered. Moving the window back sent a proper enter and fixed the scale.
Reproduction steps
Running the app with WAYLAND_DEBUG=1 shows no wl_surface.enter for the new wl_output. Undocking with the laptop panel off does the same.
Attachments
probe-run1.log
Reproducer:
gtk3-scale-probe.py
I acknowledge that:
I have searched all (open and closed) discussions and issues and my problem is not there.
I have read the Code of Conduct and agree to follow it.
I wrote this request with my own hands, my own keyboard, and in my own words.
All reactions