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:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user