[MPlayer-cvslog] r38345 - trunk/libvo/osx_objc_common.m

reimar subversion at mplayerhq.hu
Sat Feb 26 14:05:53 EET 2022


Author: reimar
Date: Sat Feb 26 14:05:53 2022
New Revision: 38345

Log:
osx_objc_common: process all events in check_events, not just one.

Fixes MPlayer being non-responsive for a while after resizing the window.

Modified:
   trunk/libvo/osx_objc_common.m

Modified: trunk/libvo/osx_objc_common.m
==============================================================================
--- trunk/libvo/osx_objc_common.m	Sat Feb 26 13:53:00 2022	(r38344)
+++ trunk/libvo/osx_objc_common.m	Sat Feb 26 14:05:53 2022	(r38345)
@@ -505,8 +505,8 @@ void vo_osx_swap_buffers(void)
 
 	event_flags = 0;
 	event = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:nil inMode:NSEventTrackingRunLoopMode dequeue:YES];
-	if (event == nil)
-		return event_flags;
+	while (event != nil)
+	{
 	[NSApp sendEvent:event];
 	// Without SDL's bootstrap code (include SDL.h in mplayer.c),
 	// on Leopard, we have trouble to get the play window automatically focused
@@ -518,6 +518,8 @@ void vo_osx_swap_buffers(void)
 		[window makeKeyAndOrderFront:self];
 	}
 #endif
+		event = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:nil inMode:NSEventTrackingRunLoopMode dequeue:YES];
+	}
 	return event_flags;
 }
 


More information about the MPlayer-cvslog mailing list