mirror of
https://github.com/rad4day/Waybar.git
synced 2025-07-13 22:52:30 +02:00
add button single click check to hyprland workspaces
This commit is contained in:
@ -849,6 +849,7 @@ std::string &Workspace::select_icon(std::map<std::string, std::string> &icons_ma
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool Workspace::handle_clicked(GdkEventButton *bt) const {
|
bool Workspace::handle_clicked(GdkEventButton *bt) const {
|
||||||
|
if (bt->type == GDK_BUTTON_PRESS) {
|
||||||
try {
|
try {
|
||||||
if (id() > 0) { // normal or numbered persistent
|
if (id() > 0) { // normal or numbered persistent
|
||||||
gIPC->getSocket1Reply("dispatch workspace " + std::to_string(id()));
|
gIPC->getSocket1Reply("dispatch workspace " + std::to_string(id()));
|
||||||
@ -863,6 +864,7 @@ bool Workspace::handle_clicked(GdkEventButton *bt) const {
|
|||||||
} catch (const std::exception &e) {
|
} catch (const std::exception &e) {
|
||||||
spdlog::error("Failed to dispatch workspace: {}", e.what());
|
spdlog::error("Failed to dispatch workspace: {}", e.what());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user