Jelajahi Sumber

Revert "Fix duplicate event dispatch in Cocoa event pump"

This reverts commit dd52dd8995dc1f0fb67e7ec8dcaa6c82416a7a4c.

After that commit mouse input is not received and the window cannot be closed or resized.

Fixes https://github.com/libsdl-org/SDL/issues/14818
Sam Lantinga 2 bulan lalu
induk
melakukan
206989a22d
1 mengubah file dengan 0 tambahan dan 8 penghapusan
  1. 0 8
      src/video/cocoa/SDL_cocoaevents.m

+ 0 - 8
src/video/cocoa/SDL_cocoaevents.m

@@ -97,14 +97,6 @@ static void Cocoa_DispatchEvent(NSEvent *theEvent)
 {
 {
     if (s_bShouldHandleEventsInSDLApplication) {
     if (s_bShouldHandleEventsInSDLApplication) {
         Cocoa_DispatchEvent(theEvent);
         Cocoa_DispatchEvent(theEvent);
-
-        // Avoid double-dispatching mouse and keyboard events. They are already handled in Cocoa_DispatchEvent.
-        // Other event types should still go through AppKit's normal handling.
-        NSEventType type = [theEvent type];
-        if ((type >= NSEventTypeLeftMouseDown && type <= NSEventTypeMouseExited) ||
-            (type >= NSEventTypeKeyDown && type <= NSEventTypeFlagsChanged)) {
-            return;
-        }
     }
     }
 
 
     [super sendEvent:theEvent];
     [super sendEvent:theEvent];