Skip to content

Commit

Permalink
wm: added support for switching workspaces with client message
Browse files Browse the repository at this point in the history
  • Loading branch information
aesophor committed Feb 11, 2019
1 parent fd30739 commit eb3c640
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/wm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,11 @@ void WindowManager::OnMotionNotify(const XButtonEvent& e) {
}

void WindowManager::OnClientMessage(const XClientMessageEvent& e) {

if (e.message_type == prop_->net[atom::NET_CURRENT_DESKTOP]) {
if (e.data.l[0] >= 0 && e.data.l[0] < WORKSPACE_COUNT) {
GotoWorkspace(e.data.l[0]);
}
}
}

int WindowManager::OnXError(Display* dpy, XErrorEvent* e) {
Expand Down

0 comments on commit eb3c640

Please sign in to comment.