Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Api: "view-unfocused" signal #1413

Closed
timgott opened this issue Jan 21, 2022 · 1 comment
Closed

Api: "view-unfocused" signal #1413

timgott opened this issue Jan 21, 2022 · 1 comment

Comments

@timgott
Copy link
Contributor

timgott commented Jan 21, 2022

In the code of the shadows plugin, I cannot get a reliable signal when view->activated is changed to false to check whether a view matches the configured condition.

The plugin connects to the output's view-focused signal and remembers the last focused window. However, on my secondary display, once a new window is focused the previously focused window still has view->activated == true set, and the view_matcher does not recognize that the state of the old window has changed. (Only on my secondary display; activated is false on the old window when the new window is on my laptop display)

I propose to add a view-unfocused signal that is triggered after view->activated = false has been set on a window. This would also remove the need to track the last focused window.

Alternatively, it would be even nicer to directly get a signal when a view_matcher condition matches/unmatches a view, as the plugin wouldn't have to handle signals unrelated to its functionality, but currently that is probably not worth the effort.

@ammen99
Copy link
Member

ammen99 commented Aug 4, 2023

There is now a view_activated_state_signal in latest master.

@ammen99 ammen99 closed this as completed Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants