aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/devdraw/mac-screen.m
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2024-06-17 09:28:40 -0400
committerRuss Cox <rsc@golang.org>2024-06-17 09:28:40 -0400
commita2567fcac9851e5cc965a236679f568b0e79cff2 (patch)
tree193523a618974cd5636283425ce8735d15ca06ba /src/cmd/devdraw/mac-screen.m
parente9cbe46fe6a262428a52ce7f065c98e43a70d499 (diff)
devdraw: handle shift of real mouse buttons correctly
Diffstat (limited to 'src/cmd/devdraw/mac-screen.m')
-rw-r--r--src/cmd/devdraw/mac-screen.m10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cmd/devdraw/mac-screen.m b/src/cmd/devdraw/mac-screen.m
index 04c807b7..6abdee11 100644
--- a/src/cmd/devdraw/mac-screen.m
+++ b/src/cmd/devdraw/mac-screen.m
@@ -639,9 +639,9 @@ rpc_resizewindow(Client *c, Rectangle r)
x = 2;
if(m & ~omod & NSEventModifierFlagCommand)
x = 4;
- if(m & NSEventModifierFlagShift)
- x <<= 5;
b |= x;
+ if(m & NSEventModifierFlagShift)
+ b <<= 5;
[self sendmouse:b];
}else if(m & ~omod & NSEventModifierFlagOption)
gfx_keystroke(self.client, Kalt);
@@ -698,17 +698,17 @@ rpc_resizewindow(Client *c, Rectangle r)
b = b&~6 | (b&4)>>1 | (b&2)<<1;
b = mouseswap(b);
+ m = [e modifierFlags];
if(b == 1){
- m = [e modifierFlags];
if(m & NSEventModifierFlagOption){
gfx_abortcompose(self.client);
b = 2;
}else
if(m & NSEventModifierFlagCommand)
b = 4;
- if(m & NSEventModifierFlagShift)
- b <<= 5;
}
+ if(m & NSEventModifierFlagShift)
+ b <<= 5;
[self sendmouse:b];
}