fix: accurate mouse monitor detection on Wayland via GNOME Shell extension - #2349
Open
brandor5 wants to merge 1 commit into
Open
fix: accurate mouse monitor detection on Wayland via GNOME Shell extension#2349brandor5 wants to merge 1 commit into
brandor5 wants to merge 1 commit into
Conversation
…nsion
On Wayland sessions, Guake runs as an XWayland client (GDK_BACKEND=x11).
GDK's pointer position only updates when the cursor hovers over another
XWayland window, causing 'appear on mouse display' to select the wrong
monitor when the cursor is over native Wayland apps or the desktop.
This adds a small GNOME Shell extension (guake-pointer-helper) that
queries Mutter's CursorTracker for the real Wayland cursor coordinates
and exposes them over a dedicated D-Bus interface. The existing
get_final_window_monitor() method now queries this interface on Wayland
sessions before falling back to the GDK pointer (which remains correct
on X11 sessions).
The extension is installed automatically by 'make install' to the
system-wide GNOME Shell extensions directory but must be enabled by
the user with:
gnome-extensions enable guake-pointer-helper@guake.org
A log warning is emitted on the first toggle if the extension is not
available on a Wayland session.
When the extension is not installed or not enabled, behavior is
unchanged from the current release (GDK fallback).
Fixes: Guake#2121
Fixes: Guake#2115
Refs: Guake#1689
Co-authored-by: Cursor <cursoragent@cursor.com>
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.
On Wayland sessions, Guake runs as an XWayland client (GDK_BACKEND=x11).
GDK's pointer position only updates when the cursor hovers over another
XWayland window, causing 'appear on mouse display' to select the wrong
monitor when the cursor is over native Wayland apps or the desktop.
This adds a small GNOME Shell extension (guake-pointer-helper) that
queries Mutter's CursorTracker for the real Wayland cursor coordinates
and exposes them over a dedicated D-Bus interface. The existing
get_final_window_monitor() method now queries this interface on Wayland
sessions before falling back to the GDK pointer (which remains correct
on X11 sessions).
The extension is installed automatically by 'make install' to the
system-wide GNOME Shell extensions directory but must be enabled by
the user with:
A log warning is emitted on the first toggle if the extension is not
available on a Wayland session.
When the extension is not installed or not enabled, behavior is
unchanged from the current release (GDK fallback).
Tested on GNOME Shell 50.4 / Fedora 44 / Wayland with dual 2560x1440
screens
Fixes: #2121
Fixes: #2115
Refs: #1689
Co-authored-by: Cursor cursoragent@cursor.com