XQuartz: More fullscreen fixes

Start in rooted mode when enabled
  Make the hotkey cmd-alt-a behave
(cherry picked from commit 22a54e4617)
This commit is contained in:
Jeremy Huddleston 2008-10-21 09:07:08 -07:00
parent 71ab6f5bd6
commit de4fe10ac2
4 changed files with 12 additions and 14 deletions

View File

@ -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;

View File

@ -815,9 +815,6 @@ void ddxUseMsg( void )
void ddxGiveUp( void )
{
ErrorF( "Quitting Xquartz...\n" );
//if (!quartzRootless)
// quartzProcs->ReleaseScreens();
}

View File

@ -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;
DevPrivateKey quartzScreenKey = &quartzScreenKey;
int aquaMenuBarHeight = 0;

View File

@ -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;