fix: place GNOME break overlay on each monitor in multi-monitor setups - #163
Closed
Erudition wants to merge 2 commits into
Closed
fix: place GNOME break overlay on each monitor in multi-monitor setups#163Erudition wants to merge 2 commits into
Erudition wants to merge 2 commits into
Conversation
Erudition
force-pushed
the
fix-gnome-multi-monitor
branch
from
July 27, 2026 20:50
2ac592c to
202b7e3
Compare
…around On Wayland the GNOME extension resizes the transparent workaround window to span the whole virtual desktop, so calling screen() at show-time always returns the primary monitor. Store the QScreen geometry in initSize() and use that for all Wayland-workaround geometry computations.
Revert to sizing the transparent Wayland workaround window to the full virtual desktop with global.display.get_size(). The break window now remembers its intended monitor geometry, so monitor detection and move_to_monitor in the extension are no longer needed.
Erudition
force-pushed
the
fix-gnome-multi-monitor
branch
from
July 27, 2026 22:44
fe14c02 to
6d04554
Compare
Owner
|
Thanks for the contribution. I used a Debian virtual machine for testing, which does not have a multi-display setup. I'll trust your testing and only review the code quality. But before that, there are some merge conflicts to be resolved, which are possibly caused by a recent update to automatically add/remove windows on display change. You can ping me to review the code once you are ready. |
Owner
|
I have figured out how to simulate multi-display for VMs and found a better way to fix this in 8ed6c9b. Thanks for your time and token anyway. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On GNOME/Wayland with multiple monitors, the break overlay is sized to the whole virtual desktop and placed on the wrong monitor, so it appears cut off or offset on non-primary displays.
Root cause
Two coordinate mismatches:
mainWidgetchild widget inside the Wayland workaround window, but the parent window is later moved/resized by the GNOME extension to a single monitor.global.display.get_size()(the whole desktop) instead of the target monitor's geometry.MetaWindow.move_to_monitor()is asynchronous. The extension was callingmove_to_monitor()and then immediatelymove_resize_frame(), so the resize happened before the window actually entered the target monitor, causing the overlay to be sized/positioned for the wrong display.Fix
src/app/break-window.cpp: in them_waylandWorkaroundbranches, use coordinates relative to the parent window frame formainWidgetgeometry.packaging/linux/gnome/sane-break@allanchain.github.io/extension.js: detect which monitor each break window was created on; if it is already on that monitor, resize immediately; otherwise callmove_to_monitor()and wait for thewindow-entered-monitorsignal before resizing. A 750 ms fallback timeout ensures the resize still happens if the signal is never emitted.Notes