Merge pull request #2701 from thejch/hl-ws-click

Add button click check to hyprland workspaces module
This commit is contained in:
Alexis Rouillard 2023-11-28 09:20:51 +01:00 committed by GitHub
commit 58db0baaf4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 13 deletions

View File

@ -849,6 +849,7 @@ std::string &Workspace::select_icon(std::map<std::string, std::string> &icons_ma
}
bool Workspace::handle_clicked(GdkEventButton *bt) const {
if (bt->type == GDK_BUTTON_PRESS) {
try {
if (id() > 0) { // normal or numbered persistent
gIPC->getSocket1Reply("dispatch workspace " + std::to_string(id()));
@ -863,6 +864,7 @@ bool Workspace::handle_clicked(GdkEventButton *bt) const {
} catch (const std::exception &e) {
spdlog::error("Failed to dispatch workspace: {}", e.what());
}
}
return false;
}