aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-07-26 15:56:04 +0200
committerJohn Ankarström <john@ankarstrom.se>2021-07-26 15:56:04 +0200
commit5809819063c7822ba197297090b304fb905ad89c (patch)
treec16d32a91413be91915d498fc3e12f87db5899f2 /src
parentb11701872a81f3a5114c834527e65d3bba3a2f7b (diff)
downloadjwm-5809819063c7822ba197297090b304fb905ad89c.tar.gz
Ensure released border button is same as pressed
Diffstat (limited to 'src')
-rw-r--r--src/event.c6
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;