Skip to content

Commit 3eff234

Browse files
foxnneemidoots
authored andcommitted
View: add override to remove default macos keybinds from interfering
1 parent bb7ced8 commit 3eff234

5 files changed

+408
-260
lines changed

MACHAppDelegate_arm64_apple_macos12.s

+10-6
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
.cfi_startproc
88
cbz x0, LBB0_2
99
stp x20, x19, [sp, #-32]!
10-
stp x29, x30, [sp, #16]
1110
.cfi_def_cfa_offset 32
11+
stp x29, x30, [sp, #16]
1212
.cfi_offset w30, -8
1313
.cfi_offset w29, -16
1414
.cfi_offset w19, -24
@@ -17,11 +17,15 @@
1717
mov x0, x1
1818
bl _objc_retainBlock
1919
ldr x8, [x19, #8]
20-
ldp x29, x30, [sp, #16]
21-
mov x9, x0
20+
str x0, [x19, #8]
2221
mov x0, x8
23-
str x9, [x19, #8]
22+
ldp x29, x30, [sp, #16]
2423
ldp x20, x19, [sp], #32
24+
.cfi_def_cfa_offset 0
25+
.cfi_restore w30
26+
.cfi_restore w29
27+
.cfi_restore w19
28+
.cfi_restore w20
2529
b _objc_release
2630
LBB0_2:
2731
ret
@@ -41,7 +45,7 @@ LBB1_2:
4145
.p2align 2
4246
"-[MACHAppDelegate applicationShouldTerminate:]":
4347
.cfi_startproc
44-
mov x0, xzr
48+
mov x0, #0
4549
ret
4650
.cfi_endproc
4751

@@ -56,7 +60,7 @@ LBB1_2:
5660
"-[MACHAppDelegate .cxx_destruct]":
5761
.cfi_startproc
5862
add x0, x0, #8
59-
mov x1, xzr
63+
mov x1, #0
6064
b _objc_storeStrong
6165
.cfi_endproc
6266

MACHView.m

+6
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,12 @@ - (void)magnifyWithEvent:(NSEvent *)event {
176176
_magnify_block(event);
177177
}
178178

179+
// Add this method to prevent default macos keybind operations
180+
// such as escape pulling the window out of fullscreen
181+
- (void)doCommandBySelector:(SEL)selector
182+
{
183+
}
184+
179185
// This overrides the default initializer and creates a tracking area over the
180186
// views visible rect
181187
- (id)initWithFrame:(NSRect)frame {

0 commit comments

Comments
 (0)