Merge pull request #3049 from MauroGuida/master

fix(wlr/taskbar): crash on taskbar drag and drop event
This commit is contained in:
Alexis Rouillard 2024-03-20 14:02:41 +01:00 committed by GitHub
commit 49a13ab28f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 8 deletions

View File

@ -334,9 +334,7 @@ Task::Task(const waybar::Bar &bar, const Json::Value &config, Taskbar *tbar,
}
button.add_events(Gdk::BUTTON_PRESS_MASK);
button.signal_button_press_event().connect(sigc::mem_fun(*this, &Task::handle_clicked), false);
button.signal_button_release_event().connect(sigc::mem_fun(*this, &Task::handle_button_release),
false);
button.signal_button_release_event().connect(sigc::mem_fun(*this, &Task::handle_clicked), false);
button.signal_motion_notify_event().connect(sigc::mem_fun(*this, &Task::handle_motion_notify),
false);
@ -573,12 +571,8 @@ bool Task::handle_clicked(GdkEventButton *bt) {
else
spdlog::warn("Unknown action {}", action);
return true;
}
bool Task::handle_button_release(GdkEventButton *bt) {
drag_start_button = -1;
return false;
return true;
}
bool Task::handle_motion_notify(GdkEventMotion *mn) {