fix(wlr/taskbar): crash on taskbar drag and drop event

This commit is contained in:
Mauro Guida 2024-03-20 13:28:35 +01:00
parent b9688eb067
commit 6d690ad48b
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) {