Conversation
On GNOME Wayland the capture window and the monitor selection dialog were always mapped on the built-in panel instead of the monitor the user configured as primary. Two root causes: - Qt's wayland plugin does not implement the wp_primary_output protocol, so QGuiApplication::primaryScreen() reports the first wl_output instead of the real primary. The actual primary is now queried from mutter (org.gnome.Mutter.DisplayConfig) on GNOME Wayland. - windowHandle()->setScreen() was a silent no-op because the native window does not exist before the widget is shown, and Wayland ignores move() entirely. winId() is now called before setScreen() so the fullscreen capture window and the monitor picker are recreated on the target QScreen, which is the only reliable way to choose the output on Wayland. Verified end-to-end on a GNOME Wayland session: the monitor selection dialog appears on the real primary (external) monitor and the capture overlay follows the selected monitor. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
2 tasks
… screen On Wayland regular windows are placed on the monitor containing the pointer (move()/setScreen() are ignored), so the previous capture-UI placement relied on the pointer coincidentally matching the selected screen. Fullscreen is the only window state where the requested output is honored, so the capture widget now requests fullscreen after setScreen() on Wayland. The monitor under the cursor is recovered by mapping a tiny probe window (compositors place new windows on the pointer's monitor) and the selection dialog is skipped whenever it is known. When the fallback compact picker is needed, each monitor gets a fullscreen opaque window painted with its frozen desktop (fullscreen windows cannot be translucent on GNOME Wayland) and a compact strip at the bottom; a click anywhere on a monitor selects it. X11 keeps the small translucent window moved to the bottom-center. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
DIOR27
force-pushed
the
feat/monitor-picker-autoselect
branch
from
August 14, 2026 19:16
bb8b9d3 to
007597a
Compare
Collaborator
|
Im leaning towards not merging this but want to hear from @mmahmoudian my main concern is it seems like the kind of hack that will come around and bite us later. On tiling DE's like cosmic the window also disrupts the windows as everything resizes. |
Collaborator
|
I thought about this more and i'm conceptually okay with it as long as its gated behind the same setting as X11 and windows rather than always capturing the active screen. I'm still skeptical it will work on every DE but I think enough users will be interested that its worth a try. I still need to review the code. |
Member
|
My main concern is reverting #4811. |
Collaborator
|
This should not revert #4811 once its behind the "Capture Active Monitor (skip monitor selection)" right? |
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.
Summary
Improves the Wayland monitor picker: it auto-selects the monitor under the cursor (matching the X11 "capture active monitor" behavior) and renders compactly on every screen so multi-monitor setups stay readable.
Changes
src/utils/monitorpreview.cpp/.hcompactmode with smaller layout and fonts, click-only hint, no number key labelssrc/utils/screengrabber.cpp/.hsrc/widgets/capture/capturewidget.cppTest plan
cmake --build build-codebuff --target flameshotpassesChain context
Second PR of a stacked chain (3 PRs):
fix/wayland-monitor-placement(Fix Wayland multi-monitor: show capture UI on the correct monitor #4874) — base: fix Wayland monitor placementfeat/hybrid-monitor-switching— "Capture this monitor" strips + reuse stored screenshotsOut of scope: capture-time monitor switching — that lands in the next PR.