Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

implement idle inhibitor protocol #133

Merged
merged 1 commit into from
Mar 24, 2022
Merged

Conversation

sevz17
Copy link
Collaborator

@sevz17 sevz17 commented Jul 16, 2021

No description provided.

@xi
Copy link
Contributor

xi commented Aug 22, 2021

For me this crashed when using with the idle inhibitor module in waybar.

I am also not convinced that inhibitors should only be active when they are visible. I know that sway has different kinds of inhibitors (open, visible, fullscreen, focused) but I believe for a simple compositor like dwn the mere existence of an inhibitor should be enough.

So the better place to re-enable idle would be in idle_inhibitor->events.destroy.

@sevz17
Copy link
Collaborator Author

sevz17 commented Aug 22, 2021

I am also not convinced that inhibitors should only be active when they are visible. I know that sway has different kinds of inhibitors (open, visible, fullscreen, focused) but I believe for a simple compositor like dwn the mere existence of an inhibitor should be enough.

certainly it would be simpler to activate the inhibitors just for existing, that should also solve the crash with waybar.
I'll make inhibitors work just by existing, unless @djpohly says otherwise

@sevz17
Copy link
Collaborator Author

sevz17 commented Aug 22, 2021

So the better place to re-enable idle would be in idle_inhibitor->events.destroy.

I took a shortcut here, I considered that when an inhibitor is destroyed:

  1. closing a window will call focusclient ()
  2. after closing a browser tab and then clicking something will call focusclient ()

This allows clients to disable idle monitoring
@sevz17 sevz17 merged commit ae614ee into djpohly:main Mar 24, 2022
@sevz17 sevz17 deleted the idle-inhibitor branch March 24, 2022 17:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants