aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/devdraw
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2024-06-15 10:55:21 -0400
committerRuss Cox <rsc@golang.org>2024-06-15 10:57:45 -0400
commit0c79c32675e83ff3d87d5bf52082652d85486a45 (patch)
tree8b7042e878874a1ed870f26571b7a2383be231f1 /src/cmd/devdraw
parent60ca2be037f739e30daba1dc5b66a166fcdc0bf2 (diff)
acme: shift button 3 for reverse search
An experiment. Let's see if it's any good. Also document the Mac conventions in devdraw(3).
Diffstat (limited to 'src/cmd/devdraw')
-rw-r--r--src/cmd/devdraw/mac-screen.m13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/cmd/devdraw/mac-screen.m b/src/cmd/devdraw/mac-screen.m
index f07054cf..04c807b7 100644
--- a/src/cmd/devdraw/mac-screen.m
+++ b/src/cmd/devdraw/mac-screen.m
@@ -631,12 +631,17 @@ rpc_resizewindow(Client *c, Rectangle r)
b = [NSEvent pressedMouseButtons];
b = (b&~6) | (b&4)>>1 | (b&2)<<1;
if(b){
+ int x;
+ x = 0;
if(m & ~omod & NSEventModifierFlagControl)
- b |= 1;
+ x = 1;
if(m & ~omod & NSEventModifierFlagOption)
- b |= 2;
+ x = 2;
if(m & ~omod & NSEventModifierFlagCommand)
- b |= 4;
+ x = 4;
+ if(m & NSEventModifierFlagShift)
+ x <<= 5;
+ b |= x;
[self sendmouse:b];
}else if(m & ~omod & NSEventModifierFlagOption)
gfx_keystroke(self.client, Kalt);
@@ -701,6 +706,8 @@ rpc_resizewindow(Client *c, Rectangle r)
}else
if(m & NSEventModifierFlagCommand)
b = 4;
+ if(m & NSEventModifierFlagShift)
+ b <<= 5;
}
[self sendmouse:b];
}