GNOME Bugzilla – Bug 788511
Add support for retrieving the active window
Last modified: 2021-07-05 13:45:49 UTC
Hello wonderful Gnome/mutter devs, I'm developing an open source time tracking tool called ActivityWatch: https://github.com/ActivityWatch/activitywatch A large part of it depends on tracking the active window, but with Wayland that is no longer possible. So now I'm wondering if there is any chance one could get that information out of mutter? I created this question on Stack Overflow a while back but that contains more details: https://stackoverflow.com/q/45465016/965332 Sorry if this is the wrong place to ask, I figured it would either be here or the mailing list (already tried IRC). Thanks for all the great work you're doing!
Clients in Wayland are completely isolated from each other, and that is not something that will change, thus one client will not receive information about any other. So there will not be a Wayland solution available. With that said, there are some ideas floating around to expose various xdotool like features in a different way. Nobody is working on it though, and it is not directly related to mutter, bur rather something mutter would implement. Read more about it here: https://lists.freedesktop.org/archives/wayland-devel/2017-March/033514.html and here: https://github.com/whot/woodotool Note that the above stuff is so far only about the input event injection part, so consider the window state introspection even less being worked on.
Marking as triaged. It should be moved to gnome-shell after migration, as gnome-shell is in a better situaton to provide introspection.
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/mutter/-/issues/ Thank you for your understanding and your help.