Skip to content

Commit 13904fc

Browse files
committed
Disable input handling on MacOS.
Don't swallow event, instead push further
1 parent 0324c6b commit 13904fc

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Sources/MacOSAppSupport/MAS_NodeEditorNSViewControl.mm

+13
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ - (void) drawRect : (NSRect) dirtyRect
5050
- (void) mouseDown : (NSEvent*) event
5151
{
5252
if (!nodeEditorControl->IsInputHandlingEnabled ()) {
53+
[super mouseDown: event];
5354
return;
5455
}
5556
NUIE::Point position = MAS::GetViewPositionFromEvent (self, event);
@@ -64,6 +65,7 @@ - (void) mouseDown : (NSEvent*) event
6465
- (void) mouseUp : (NSEvent*) event
6566
{
6667
if (!nodeEditorControl->IsInputHandlingEnabled ()) {
68+
[super mouseUp: event];
6769
return;
6870
}
6971
NUIE::Point position = MAS::GetViewPositionFromEvent (self, event);
@@ -74,6 +76,7 @@ - (void) mouseUp : (NSEvent*) event
7476
- (void) rightMouseDown : (NSEvent*) event
7577
{
7678
if (!nodeEditorControl->IsInputHandlingEnabled ()) {
79+
[super rightMouseDown: event];
7780
return;
7881
}
7982
NUIE::Point position = MAS::GetViewPositionFromEvent (self, event);
@@ -84,6 +87,7 @@ - (void) rightMouseDown : (NSEvent*) event
8487
- (void) rightMouseUp : (NSEvent*) event
8588
{
8689
if (!nodeEditorControl->IsInputHandlingEnabled ()) {
90+
[super rightMouseUp: event];
8791
return;
8892
}
8993
NUIE::Point position = MAS::GetViewPositionFromEvent (self, event);
@@ -94,6 +98,7 @@ - (void) rightMouseUp : (NSEvent*) event
9498
- (void) otherMouseDown : (NSEvent*) event
9599
{
96100
if (!nodeEditorControl->IsInputHandlingEnabled ()) {
101+
[super otherMouseDown: event];
97102
return;
98103
}
99104
NUIE::Point position = MAS::GetViewPositionFromEvent (self, event);
@@ -104,6 +109,7 @@ - (void) otherMouseDown : (NSEvent*) event
104109
- (void) otherMouseUp : (NSEvent*) event
105110
{
106111
if (!nodeEditorControl->IsInputHandlingEnabled ()) {
112+
[super otherMouseUp: event];
107113
return;
108114
}
109115
NUIE::Point position = MAS::GetViewPositionFromEvent (self, event);
@@ -114,6 +120,7 @@ - (void) otherMouseUp : (NSEvent*) event
114120
- (void) mouseDragged : (NSEvent*) event
115121
{
116122
if (!nodeEditorControl->IsInputHandlingEnabled ()) {
123+
[super mouseDragged: event];
117124
return;
118125
}
119126
NUIE::Point position = MAS::GetViewPositionFromEvent (self, event);
@@ -124,6 +131,7 @@ - (void) mouseDragged : (NSEvent*) event
124131
- (void) rightMouseDragged : (NSEvent*) event
125132
{
126133
if (!nodeEditorControl->IsInputHandlingEnabled ()) {
134+
[super rightMouseDragged: event];
127135
return;
128136
}
129137
NUIE::Point position = MAS::GetViewPositionFromEvent (self, event);
@@ -134,6 +142,7 @@ - (void) rightMouseDragged : (NSEvent*) event
134142
- (void) otherMouseDragged : (NSEvent*) event
135143
{
136144
if (!nodeEditorControl->IsInputHandlingEnabled ()) {
145+
[super otherMouseDragged: event];
137146
return;
138147
}
139148
NUIE::Point position = MAS::GetViewPositionFromEvent (self, event);
@@ -144,6 +153,7 @@ - (void) otherMouseDragged : (NSEvent*) event
144153
- (void) scrollWheel : (NSEvent*) event
145154
{
146155
if (!nodeEditorControl->IsInputHandlingEnabled ()) {
156+
[super scrollWheel: event];
147157
return;
148158
}
149159
NUIE::NodeEditor* nodeEditor = nodeEditorControl->GetNodeEditor ();
@@ -165,6 +175,7 @@ - (void) scrollWheel : (NSEvent*) event
165175
- (void) magnifyWithEvent : (NSEvent*) event
166176
{
167177
if (!nodeEditorControl->IsInputHandlingEnabled ()) {
178+
[super magnifyWithEvent: event];
168179
return;
169180
}
170181
NUIE::Point position = MAS::GetViewPositionFromEvent (self, event);
@@ -179,6 +190,7 @@ - (void) magnifyWithEvent : (NSEvent*) event
179190
- (void) swipeWithEvent : (NSEvent*) event
180191
{
181192
if (!nodeEditorControl->IsInputHandlingEnabled ()) {
193+
[super swipeWithEvent: event];
182194
return;
183195
}
184196
NUIE::NodeEditor* nodeEditor = nodeEditorControl->GetNodeEditor ();
@@ -188,6 +200,7 @@ - (void) swipeWithEvent : (NSEvent*) event
188200
- (void) keyDown : (NSEvent*) event
189201
{
190202
if (!nodeEditorControl->IsInputHandlingEnabled ()) {
203+
[super keyDown: event];
191204
return;
192205
}
193206
if (!nodeEditorControl->IsMouseOverEditorWindow ()) {

0 commit comments

Comments
 (0)