Skip to content

panel: show new toplevels as inactive by default#292

Merged
ammen99 merged 1 commit intoWayfireWM:masterfrom
dkondor:toplevel_inactive_default
Nov 4, 2025
Merged

panel: show new toplevels as inactive by default#292
ammen99 merged 1 commit intoWayfireWM:masterfrom
dkondor:toplevel_inactive_default

Conversation

@dkondor
Copy link
Contributor

@dkondor dkondor commented Apr 13, 2025

I realized that currently, the panel's window list implementation assumes that a newly opened toplevel is always "active". If this is not true (i.e. a toplevel opens, but is not focused, e.g. using the option from WayfireWM/wayfire#2627), then the panel will display two active toplevels:

current_double_active

This PR fixes it by setting the state to inactive by default until a "state" event is received. This results in correctly only one toplevel displayed as active:

no_default_active

If the newly created toplevel is the active one, we will get notified explicitly (via the "state" event). However, if a toplevel is opened in the "background", no event will be sent, and we should not show it as active.
Copy link
Member

@ammen99 ammen99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks!

@ammen99 ammen99 merged commit e085897 into WayfireWM:master Nov 4, 2025
2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants