Skip to content
Browse files

Don'r allow the desktop switcher or bar to be moved

  • Loading branch information...
1 parent a3cb070 commit cd172e85a4cd11c0dfc9ded0c869c0229920fa39 @moetunes committed
Showing with 6 additions and 3 deletions.
  1. +6 −3 snapwm.c
View
9 snapwm.c
@@ -992,22 +992,25 @@ void leavenotify(XEvent *e) {
void buttonpress(XEvent *e) {
XButtonEvent *ev = &e->xbutton;
client *c;
+ int i;
if(STATUS_BAR == 0) {
- int i;
+ if(sb_area == ev->subwindow) return;
for(i=0;i<DESKTOPS;i++)
- if(i != current_desktop && sb_bar[i].sb_win == ev->window) {
+ if(sb_bar[i].sb_win == ev->subwindow) return;
+ if(sb_bar[i].sb_win == ev->window && i != current_desktop) {
Arg a = {.i = i};
change_desktop(a);
return;
} else {
- if(i == current_desktop && sb_bar[i].sb_win == ev->window) {
+ if(sb_bar[i].sb_win == ev->window && i == current_desktop) {
next_win();
return;
}
}
}
+ printf("WOOT!!\n");
// change focus with LMB
if(clicktofocus == 0 && ev->window != current->win && ev->button == Button1)
for(c=head;c;c=c->next) {

0 comments on commit cd172e8

Please sign in to comment.
Something went wrong with that request. Please try again.