summaryrefslogtreecommitdiff
path: root/hw/xquartz/X11Application.m
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@freedesktop.org>2008-10-31 20:03:34 -0700
committerJeremy Huddleston <jeremyhu@freedesktop.org>2008-10-31 20:05:39 -0700
commitf8af66ddb21b4fb1ae5b4f7f852418ca7b0e7aec (patch)
treeaad5141217d29d5f82745d7f719cb88cb7d9b8d0 /hw/xquartz/X11Application.m
parentc5086badf0387d4d5af10882de90a1faa180550f (diff)
XQuartz: Add option to allow access to the menu in fullscreen mode
(cherry picked from commit 637a9f4bd1ff2b55c870a08ead4940df0f9818e5)
Diffstat (limited to 'hw/xquartz/X11Application.m')
-rw-r--r--hw/xquartz/X11Application.m26
1 files changed, 12 insertions, 14 deletions
diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index e6a61175a..fa7c532cc 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -59,7 +59,7 @@
#define ProximityIn 0
#define ProximityOut 1
-int X11EnableKeyEquivalents = TRUE;
+int X11EnableKeyEquivalents = TRUE, quartzFullscreenMenu = FALSE;
int quartzHasRoot = FALSE, quartzEnableRootless = TRUE;
static TISInputSourceRef last_key_layout;
@@ -353,14 +353,11 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
}
- (void) show_hide_menubar:(NSNumber *)state {
-#if defined(__LP64__)
- /* Also shows/hides the dock */
- if ([state boolValue]) SetSystemUIMode(kUIModeNormal, 0);
- else SetSystemUIMode(kUIModeAllHidden, 0);
-#else
- if ([state boolValue]) ShowMenuBar ();
- else HideMenuBar ();
-#endif
+ /* Also shows/hides the dock */
+ if ([state boolValue])
+ SetSystemUIMode(kUIModeNormal, 0);
+ else
+ SetSystemUIMode(kUIModeAllHidden, quartzFullscreenMenu ? kUIOptionAutoShowMenuBar : 0); // kUIModeAllSuppressed or kUIOptionAutoShowMenuBar can be used to allow "mouse-activation"
}
@@ -638,14 +635,15 @@ static NSMutableArray * cfarray_to_nsarray (CFArrayRef in) {
const char *tem;
quartzUseSysBeep = [self prefs_get_boolean:@PREFS_SYSBEEP
- default:quartzUseSysBeep];
+ default:quartzUseSysBeep];
quartzEnableRootless = [self prefs_get_boolean:@PREFS_ROOTLESS
- default:quartzEnableRootless];
+ default:quartzEnableRootless];
+ quartzFullscreenMenu = [self prefs_get_boolean:@PREFS_FULLSCREEN_MENU
+ default:quartzFullscreenMenu];
quartzFullscreenDisableHotkeys = ![self prefs_get_boolean:
- @PREFS_FULLSCREEN_HOTKEYS default:
- !quartzFullscreenDisableHotkeys];
+ @PREFS_FULLSCREEN_HOTKEYS default:!quartzFullscreenDisableHotkeys];
darwinFakeButtons = [self prefs_get_boolean:@PREFS_FAKEBUTTONS
- default:darwinFakeButtons];
+ default:darwinFakeButtons];
if (darwinFakeButtons) {
const char *fake2, *fake3;