Simplified (and sped up) mouse movement processing when in fullscreen mode.

This commit is contained in:
nigel 2003-03-11 11:31:01 +00:00
parent ef73063528
commit 7726ef1b05

View File

@ -193,6 +193,7 @@
type: (NSEventType)type type: (NSEventType)type
{ {
EmulatorView *view; EmulatorView *view;
BOOL fullScreen;
#ifdef ENABLE_MULTIPLE #ifdef ENABLE_MULTIPLE
// We need to work out what window's Emulator should receive these messages // We need to work out what window's Emulator should receive these messages
@ -204,21 +205,23 @@
{ {
theEmulator = [emulators objectAtIndex: tmp]; theEmulator = [emulators objectAtIndex: tmp];
view = [theEmulator screen]; view = [theEmulator screen];
fullScreen = [view isFullScreen];
if ( [theEmulator isRunning] && if ( [theEmulator isRunning] &&
( [[theEmulator window] isMainWindow] || [view isFullScreen] ) ) ( fullScreen || [[theEmulator window] isMainWindow] ) )
break; break;
} }
if ( tmp < [emulators count] ) // i.e. if we exited the for loop if ( tmp < [emulators count] ) // i.e. if we exited the for loop
#else #else
view = [theEmulator screen]; view = [theEmulator screen];
fullScreen = [view isFullScreen];
if ( [theEmulator isRunning] && if ( [theEmulator isRunning] &&
( [[theEmulator window] isMainWindow] || [view isFullScreen] ) ) ( fullScreen || [[theEmulator window] isMainWindow] ) )
#endif #endif
{ {
if ( [view mouseInView: event] ) if ( fullScreen || [view mouseInView: event] )
{ {
switch ( type ) switch ( type )
{ {
@ -230,6 +233,9 @@
break; break;
case NSLeftMouseDragged: case NSLeftMouseDragged:
case NSMouseMoved: case NSMouseMoved:
if ( fullScreen )
[view fullscreenMouseMove];
else
[view processMouseMove: event]; [view processMouseMove: event];
break; break;
default: default: