Skip to content

Commit

Permalink
Support platforms without KDE idle mechanism
Browse files Browse the repository at this point in the history
This change allows aw-watcher-window-wayland to work even if the KDE
idle mechanism is not present. It does that by attempting to instantiate
a KDE Idle object as normal, but not panicking if that fails, and
instead marking the idle part of the watcher as inactive, and not making
subsequent calls to it.

The background is that Issue #35 [1] reports that sway has switched idle
mechanisms to not use the KDE idle mechanism. Presumably, other window
managers may also fail to support the KDE idle mechanism. Pending full
support for idle-notify-v1, it's still useful to use activity watch on
sway to get focused window titles, so this commit allows the program to
run on sway.

Some changes to Cargo.lock were necessary to compile.

[1] #35
  • Loading branch information
Max Morehead committed Aug 15, 2024
1 parent 56b4296 commit 4ebb5a4
Show file tree
Hide file tree
Showing 3 changed files with 456 additions and 443 deletions.
Loading

0 comments on commit 4ebb5a4

Please sign in to comment.