diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m index ab617bd04..6e0b16e3b 100644 --- a/hw/xquartz/X11Application.m +++ b/hw/xquartz/X11Application.m @@ -232,18 +232,12 @@ static void message_kit_thread (SEL selector, NSObject *arg) { if([e type] == NSKeyDown) { /* Before that though, see if there are any global - shortcuts bound to it. */ + * shortcuts bound to it. */ if(darwinAppKitModMask & [e modifierFlags]) { /* Override to force sending to Appkit */ swallow_up = [e keyCode]; for_x = NO; - } else if(!quartzEnableRootless - && ([e modifierFlags] & ALL_KEY_MASKS) == (NSCommandKeyMask | NSAlternateKeyMask) - && ([e keyCode] == 0 /*a*/ || [e keyCode] == 53 /*Esc*/)) { - swallow_up = [e keyCode]; - for_x = NO; - DarwinSendDDXEvent(kXquartzToggleFullscreen, 0); #if XPLUGIN_VERSION >= 1 } else if(X11EnableKeyEquivalents && xp_is_symbolic_hotkey_event([e eventRef])) { @@ -252,16 +246,25 @@ static void message_kit_thread (SEL selector, NSObject *arg) { #endif } else if(X11EnableKeyEquivalents && [[self mainMenu] performKeyEquivalent:e]) { + swallow_up = [e keyCode]; for_appkit = NO; + for_x = NO; + } else if(!quartzEnableRootless + && ([e modifierFlags] & ALL_KEY_MASKS) == (NSCommandKeyMask | NSAlternateKeyMask) + && ([e keyCode] == 0 /*a*/ || [e keyCode] == 53 /*Esc*/)) { + /* We have this here to force processing fullscreen + * toggle even if X11EnableKeyEquivalents is disabled */ swallow_up = [e keyCode]; for_x = NO; + for_appkit = NO; + DarwinSendDDXEvent(kXquartzToggleFullscreen, 0); } else { /* No kit window is focused, so send it to X. */ for_appkit = NO; } } else { /* KeyUp */ /* If we saw a key equivalent on the down, don't pass - the up through to X. */ + * the up through to X. */ if (swallow_up != 0 && [e keyCode] == swallow_up) { swallow_up = 0; diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c index dd37e9f24..0129d5e51 100644 --- a/hw/xquartz/darwin.c +++ b/hw/xquartz/darwin.c @@ -805,9 +805,6 @@ void ddxUseMsg( void ) void ddxGiveUp( void ) { ErrorF( "Quitting Xquartz...\n" ); - - //if (!quartzRootless) - // quartzProcs->ReleaseScreens(); } diff --git a/hw/xquartz/quartz.c b/hw/xquartz/quartz.c index 6d1846bec..2e4aad51d 100644 --- a/hw/xquartz/quartz.c +++ b/hw/xquartz/quartz.c @@ -68,11 +68,10 @@ // Shared global variables for Quartz modes int quartzEventWriteFD = -1; -int quartzRootless = -1; int quartzUseSysBeep = 0; int quartzUseAGL = 1; int quartzEnableKeyEquivalents = 1; -int quartzServerVisible = TRUE; +int quartzServerVisible = FALSE; int quartzServerQuitting = FALSE; static int quartzScreenKeyIndex; DevPrivateKey quartzScreenKey = &quartzScreenKeyIndex; diff --git a/hw/xquartz/quartzCommon.h b/hw/xquartz/quartzCommon.h index a17ebb24e..1c0eeba9c 100644 --- a/hw/xquartz/quartzCommon.h +++ b/hw/xquartz/quartzCommon.h @@ -55,7 +55,6 @@ typedef struct { extern int quartzEventWriteFD; // User preferences used by Quartz modes -extern int quartzRootless; extern int quartzUseSysBeep; extern int focusOnNewWindow; extern int quartzUseAGL;