diff options
Diffstat (limited to 'dwm.c')
| -rw-r--r-- | dwm.c | 16 |
1 files changed, 10 insertions, 6 deletions
| @@ -335,16 +335,20 @@ buttonpress(XEvent *e) { | |||
| 335 | focus(c); | 335 | focus(c); |
| 336 | if(CLEANMASK(ev->state) != MODKEY) | 336 | if(CLEANMASK(ev->state) != MODKEY) |
| 337 | return; | 337 | return; |
| 338 | if(ev->button == Button1 && (isarrange(floating) || c->isfloating)) { | 338 | if(ev->button == Button1) { |
| 339 | restack(); | 339 | if(!isarrange(floating) && !c->isfloating) |
| 340 | togglefloating(NULL); | ||
| 341 | else | ||
| 342 | restack(); | ||
| 340 | movemouse(c); | 343 | movemouse(c); |
| 341 | } | 344 | } |
| 342 | else if(ev->button == Button2) | 345 | else if(ev->button == Button2) |
| 343 | zoom(NULL); | 346 | zoom(NULL); |
| 344 | else if(ev->button == Button3 | 347 | else if(ev->button == Button3 && !c->isfixed) { |
| 345 | && (isarrange(floating) || c->isfloating) && !c->isfixed) | 348 | if(!isarrange(floating) && !c->isfloating) |
| 346 | { | 349 | togglefloating(NULL); |
| 347 | restack(); | 350 | else |
| 351 | restack(); | ||
| 348 | resizemouse(c); | 352 | resizemouse(c); |
| 349 | } | 353 | } |
| 350 | } | 354 | } |
