fix(wlr/taskbar): stop forcing tasks onto every output's bar

hide_if_duplicate() unconditionally re-ran handle_output_enter() with
the bar's own wl_output for every non-squashed task, so any app_id or
title event made the task visible on all bars and "all-outputs": false
was effectively ignored. The un-squash path in handle_closed() showed
the replacement task unconditionally, with the same effect.

Track whether the toplevel is actually on the bar's output from the
protocol's output_enter/output_leave events, split the button
show/hide logic out of the protocol handlers, and gate every synthetic
re-show on all-outputs or the tracked output membership.

Fixes #5178
This commit is contained in:
Austin Horstman
2026-07-05 10:23:06 -05:00
parent bf59a21815
commit cbad42bc9b
2 changed files with 58 additions and 34 deletions
+6
View File
@@ -71,6 +71,10 @@ class Task {
bool button_visible_ = false;
bool ignored_ = false;
bool squashed_ = false;
/* Whether the toplevel is on this bar's output, per the protocol's
* output_enter/output_leave events */
bool on_bar_output_ = false;
bool size_allocate_connected_ = false;
bool with_icon_ = false;
bool with_name_ = false;
@@ -96,6 +100,8 @@ class Task {
void on_button_size_allocated(Gtk::Allocation& alloc);
void hide_if_ignored();
void hide_if_duplicate();
void show_button();
void hide_button();
public:
/* Getter functions */