Add GNOME Shell extension and window manager using Mutter window data and mouse position
Similar to the KWinWindowManager
implementation added
in previous commits that retrieves window information
(and more) from KWin, this adds a new GnomeShellWindowManager
that retrieves information from GNOME Shell/Mutter,
without having to rely on Wnck, with the latter not working
correctly on Wayland.
Since the information cannot be directly queried from the Python side, this adds a GNOME Shell extension (ID: "accerciser@accerciser.gnome.org") that implements a DBus service that provides DBus methods that return the relevant information.
The new GnomeShellWindowManager
then uses that
DBus interface to query the information.
In a test in a GNOME Wayland session on Fedora RawHide (GNOME 46, the only supported version for now), the exact area of a control is highlighted e.g. for gedit, but it is some pixels off for e.g. the Qt 6 qtbase standarddialogs sample app.
Retrieving the mouse position from Mutter also makes "Inspect under mouse" feature work in that setup.
For now, use of the new GnomeShellWindowManager
can explicitly be
enabled as follows:
- copy or symlink GNOME Shell extension to user's GNOME Shell extension directory:
mkdir -p ~/.local/share/gnome-shell/extensions/
ln -s $(readlink -f ./gnome-shell-extension/accerciser@accerciser.gnome.org) ~/.local/share/gnome-shell/extensions/
-
log out of GNOME session and log in again (needed for the extension to become available after step 1)
-
enable extension:
gnome-extensions enable accerciser@accerciser.gnome.org
- set environment variable:
export ACCERCISER_WINDOW_MANAGER=gnomeshell
- start Accerciser
After using Accerciser, the extension can be disabled again using
gnome-extensions disable accerciser@accerciser.gnome.org
Issue: #41