question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Wayland is now the default display server on some popular distros such as Fedora 25.

It would be great if ActivityWatch worked on Wayland!

On v0.7.0b1 I just get this log line repeatedly:

2017-08-02 09:35:59,457 [WARNING]: Failed to find active window, id found was 0x0 (aw_watcher_window.lib:19)

<bountysource-plugin>

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource. </bountysource-plugin>

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:24
  • Comments:33 (16 by maintainers)

github_iconTop GitHub Comments

13reactions
johan-bjareholtcommented, Feb 17, 2022

@jacksongoode It’s still on the roadmap, but due to the lack on an API to fetch appnames and titles from windows makes it impossible to implement across all wayland compositors. I’ve tried to start discussions about it and would be open to implement and standardize an API, but the negative response makes me reluctant to even try since I’m not sure if such a thing would even get merged and don’t want to risk wasting my time. Please upvote the issue if you want this fixed, so upstream can see how many people it impacts. https://github.com/flatpak/xdg-desktop-portal/issues/304

There was a GNOME-specific solution for a while which was linked higher up in this thread, but that seems to not work anymore after GNOME 41.

I have made a watcher called aw-watcher-window-wayland which works for compositors based on wlroots. It works very well and I use that daily, but unfortunately that’s a very small subset of all linux users that uses sway, phosh, wayfire etc.

6reactions
ErikBjarecommented, Aug 3, 2017

Alright, just asked in the #wayland channel on Freenode. Got a response at least, but the situation seems pretty bad.

15:20:44  ErikBjare    Hello everybody. I'm working on a piece of self-tracking software called ActivityWatch (https://github.com/ActivityWatch/activitywatch). I know this isn't exactly the right place to ask, but I was wondering if anyone knew anything about getting the active window in any Wayland-using DE.
15:20:57  ErikBjare    Created a question on SO: https://stackoverflow.com/questions/45465016/how-do-i-get-the-active-window-on-gnome-wayland
15:21:25  ErikBjare    Here's the issue in my repo for it: https://github.com/ActivityWatch/activitywatch/issues/92
15:22:54  ErikBjare    There are a bunch of other applications that depend on it (RescueTime, selfspy, arbtt, ulogme, etc.) so they'd need it as well
15:24:23  blocage      ErikBjare, in the core protocol you cannot know which windnow has the keyboard or cursor focus
15:24:39  blocage      ErikBjare, in the wayland core protocol *
15:25:10  blocage      ErikBjare, you can just know if your window has the focus or not, it a design choise
15:25:23  blocage      avoid client spying each other
15:25:25  ErikBjare    blocage: I'm aware, that's my reason for concern. I'm not saying it should be included or anything, but as it looks now every DE would need to implement it themselves if these kind of applications are to be supported
15:25:46  ErikBjare    So wondering if anyone knew the teams working with Wayland on Gnome for example
15:26:11  ErikBjare    But thanks for confirming
15:26:29  blocage      ErikBjare, DE should create a custom extension, or use D-bus or other IPC
15:27:31  blocage      ErikBjare, I guess some compositor are around here, but I do not know myself if there is such extension already
15:27:44  blocage      compositor developers *
15:28:36  ErikBjare    I don't think there is (I've done quite a bit of searching), so I guess I need to catch the attention of some DE developers
15:29:16  ErikBjare    Thanks a lot though
15:29:42  ErikBjare    blocage: Would you mind if I shared logs of our conversation in the issue?                                     
15:30:05  blocage      just use it :) it's public                                                                                               
15:30:19  ErikBjare    ty :)                                                                                                            

I guess our only option is to contact some DE developers and petition them to create a way to get the info.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Wayland
Wayland is a replacement for the X11 window system protocol and architecture with the aim to be easier to develop, extend, and maintain....
Read more >
Wayland (display server protocol) - Wikipedia
Wayland is a communication protocol that specifies the communication between a display server and its clients, as well as a C library implementation...
Read more >
Wayland - ArchWiki - Arch Linux
XWayland is an X server that runs under Wayland and provides compatibility for native X11 applications that are yet to provide Wayland support....
Read more >
What Is Wayland and What Does It Means for Linux Users
Wayland is a display protocol, and a secure one at that. Each and every single application is a “client,” and your video hardware...
Read more >
Wayland - Debian Wiki
Wayland · Chromium (supported) · Firefox (supported) · LibreOffice (supported, not by default) · Java Programs (supported since OpenJDK 16?) · Emacs ...
Read more >

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found