diff options
-rw-r--r-- | src/event.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/event.c b/src/event.c index e1529ab..bf9989e 100644 --- a/src/event.c +++ b/src/event.c @@ -1221,7 +1221,7 @@ DispatchBorderButtonEvent(const XButtonEvent *event, ClientNode *np) if(event->type == ButtonPress) { PressedBorderButton = BA_CLOSE; DrawBorder(np, NULL); - } else { + } else if(PressedBorderButton == BA_CLOSE) { DeleteClient(np); } break; @@ -1229,7 +1229,7 @@ DispatchBorderButtonEvent(const XButtonEvent *event, ClientNode *np) if(event->type == ButtonPress) { PressedBorderButton = BA_MAXIMIZE; DrawBorder(np, NULL); - } else { + } else if(PressedBorderButton == BA_MAXIMIZE) { MaximizeClient(np); } break; @@ -1237,7 +1237,7 @@ DispatchBorderButtonEvent(const XButtonEvent *event, ClientNode *np) if(event->type == ButtonPress) { PressedBorderButton = BA_MINIMIZE; DrawBorder(np, NULL); - } else { + } else if(PressedBorderButton == BA_MINIMIZE) { MinimizeClient(np); } break; |