XQuartz: More fullscreen fixes
Start in rooted mode when enabled Make the hotkey cmd-alt-a behave (cherry picked from commit 22a54e46176c9cbdfaaa59ef33a6ae6a9c4969ef)
This commit is contained in:
parent
e4ea1494de
commit
2a9613980f
|
@ -232,18 +232,12 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
|
||||||
|
|
||||||
if([e type] == NSKeyDown) {
|
if([e type] == NSKeyDown) {
|
||||||
/* Before that though, see if there are any global
|
/* Before that though, see if there are any global
|
||||||
shortcuts bound to it. */
|
* shortcuts bound to it. */
|
||||||
|
|
||||||
if(darwinAppKitModMask & [e modifierFlags]) {
|
if(darwinAppKitModMask & [e modifierFlags]) {
|
||||||
/* Override to force sending to Appkit */
|
/* Override to force sending to Appkit */
|
||||||
swallow_up = [e keyCode];
|
swallow_up = [e keyCode];
|
||||||
for_x = NO;
|
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
|
#if XPLUGIN_VERSION >= 1
|
||||||
} else if(X11EnableKeyEquivalents &&
|
} else if(X11EnableKeyEquivalents &&
|
||||||
xp_is_symbolic_hotkey_event([e eventRef])) {
|
xp_is_symbolic_hotkey_event([e eventRef])) {
|
||||||
|
@ -252,16 +246,25 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
|
||||||
#endif
|
#endif
|
||||||
} else if(X11EnableKeyEquivalents &&
|
} else if(X11EnableKeyEquivalents &&
|
||||||
[[self mainMenu] performKeyEquivalent:e]) {
|
[[self mainMenu] performKeyEquivalent:e]) {
|
||||||
|
swallow_up = [e keyCode];
|
||||||
for_appkit = NO;
|
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];
|
swallow_up = [e keyCode];
|
||||||
for_x = NO;
|
for_x = NO;
|
||||||
|
for_appkit = NO;
|
||||||
|
DarwinSendDDXEvent(kXquartzToggleFullscreen, 0);
|
||||||
} else {
|
} else {
|
||||||
/* No kit window is focused, so send it to X. */
|
/* No kit window is focused, so send it to X. */
|
||||||
for_appkit = NO;
|
for_appkit = NO;
|
||||||
}
|
}
|
||||||
} else { /* KeyUp */
|
} else { /* KeyUp */
|
||||||
/* If we saw a key equivalent on the down, don't pass
|
/* 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) {
|
if (swallow_up != 0 && [e keyCode] == swallow_up) {
|
||||||
swallow_up = 0;
|
swallow_up = 0;
|
||||||
|
|
|
@ -805,9 +805,6 @@ void ddxUseMsg( void )
|
||||||
void ddxGiveUp( void )
|
void ddxGiveUp( void )
|
||||||
{
|
{
|
||||||
ErrorF( "Quitting Xquartz...\n" );
|
ErrorF( "Quitting Xquartz...\n" );
|
||||||
|
|
||||||
//if (!quartzRootless)
|
|
||||||
// quartzProcs->ReleaseScreens();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -68,11 +68,10 @@
|
||||||
|
|
||||||
// Shared global variables for Quartz modes
|
// Shared global variables for Quartz modes
|
||||||
int quartzEventWriteFD = -1;
|
int quartzEventWriteFD = -1;
|
||||||
int quartzRootless = -1;
|
|
||||||
int quartzUseSysBeep = 0;
|
int quartzUseSysBeep = 0;
|
||||||
int quartzUseAGL = 1;
|
int quartzUseAGL = 1;
|
||||||
int quartzEnableKeyEquivalents = 1;
|
int quartzEnableKeyEquivalents = 1;
|
||||||
int quartzServerVisible = TRUE;
|
int quartzServerVisible = FALSE;
|
||||||
int quartzServerQuitting = FALSE;
|
int quartzServerQuitting = FALSE;
|
||||||
static int quartzScreenKeyIndex;
|
static int quartzScreenKeyIndex;
|
||||||
DevPrivateKey quartzScreenKey = &quartzScreenKeyIndex;
|
DevPrivateKey quartzScreenKey = &quartzScreenKeyIndex;
|
||||||
|
|
|
@ -55,7 +55,6 @@ typedef struct {
|
||||||
extern int quartzEventWriteFD;
|
extern int quartzEventWriteFD;
|
||||||
|
|
||||||
// User preferences used by Quartz modes
|
// User preferences used by Quartz modes
|
||||||
extern int quartzRootless;
|
|
||||||
extern int quartzUseSysBeep;
|
extern int quartzUseSysBeep;
|
||||||
extern int focusOnNewWindow;
|
extern int focusOnNewWindow;
|
||||||
extern int quartzUseAGL;
|
extern int quartzUseAGL;
|
||||||
|
|
Loading…
Reference in New Issue