XQuartz: Added appkit_modifiers defaults option which users can set to 'rcommand' to get access to the input menu with right command
(cherry picked from commit 02af74d7a5a7225f408915254c40856159dc7f19) (cherry picked from commit 2da32894dff8340f6ca7c980277fca7ec835a193)
This commit is contained in:
parent
be06961312
commit
ed42108920
|
@ -91,6 +91,7 @@ extern int quartzHasRoot, quartzEnableRootless;
|
|||
#define PREFS_NO_QUIT_ALERT "no_quit_alert"
|
||||
#define PREFS_FAKE_BUTTON2 "fake_button2"
|
||||
#define PREFS_FAKE_BUTTON3 "fake_button3"
|
||||
#define PREFS_APPKIT_MODIFIERS "appkit_modifiers"
|
||||
#define PREFS_ROOTLESS "rootless"
|
||||
#define PREFS_FULLSCREEN_HOTKEYS "fullscreen_hotkeys"
|
||||
#define PREFS_SWAP_ALT_META "swap_alt_meta"
|
||||
|
|
|
@ -200,6 +200,11 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
|
|||
/* By default pass down the responder chain and to X. */
|
||||
for_appkit = YES;
|
||||
for_x = YES;
|
||||
|
||||
if(darwinAppKitModMask & [e modifierFlags]) {
|
||||
[super sendEvent:e];
|
||||
return;
|
||||
}
|
||||
|
||||
switch (type) {
|
||||
case NSLeftMouseDown: case NSRightMouseDown: case NSOtherMouseDown:
|
||||
|
@ -617,14 +622,17 @@ static NSMutableArray * cfarray_to_nsarray (CFArrayRef in) {
|
|||
darwinFakeButtons = [self prefs_get_boolean:@PREFS_FAKEBUTTONS
|
||||
default:darwinFakeButtons];
|
||||
if (darwinFakeButtons) {
|
||||
const char *fake2, *fake3;
|
||||
|
||||
fake2 = [self prefs_get_string:@PREFS_FAKE_BUTTON2 default:NULL];
|
||||
fake3 = [self prefs_get_string:@PREFS_FAKE_BUTTON3 default:NULL];
|
||||
|
||||
if (fake2 != NULL) darwinFakeMouse2Mask = DarwinParseModifierList(fake2);
|
||||
if (fake3 != NULL) darwinFakeMouse3Mask = DarwinParseModifierList(fake3);
|
||||
const char *fake2, *fake3;
|
||||
|
||||
fake2 = [self prefs_get_string:@PREFS_FAKE_BUTTON2 default:NULL];
|
||||
fake3 = [self prefs_get_string:@PREFS_FAKE_BUTTON3 default:NULL];
|
||||
|
||||
if (fake2 != NULL) darwinFakeMouse2Mask = DarwinParseModifierList(fake2);
|
||||
if (fake3 != NULL) darwinFakeMouse3Mask = DarwinParseModifierList(fake3);
|
||||
}
|
||||
|
||||
tem = [self prefs_get_string:@PREFS_APPKIT_MODIFIERS default:NULL];
|
||||
if (tem != NULL) darwinAppKitModMask = DarwinParseModifierList(tem);
|
||||
|
||||
X11EnableKeyEquivalents = [self prefs_get_boolean:@PREFS_KEYEQUIVS
|
||||
default:X11EnableKeyEquivalents];
|
||||
|
|
|
@ -112,6 +112,9 @@ int darwinFakeMouse2Mask = NX_ALTERNATEMASK;
|
|||
int darwinFakeMouse3Mask = NX_COMMANDMASK;
|
||||
#endif
|
||||
|
||||
// Modifier mask for overriding event delivery to appkit (might be useful to set this to rcommand for input menu
|
||||
int darwinAppKitModMask = 0;
|
||||
|
||||
// devices
|
||||
DeviceIntPtr darwinPointer = NULL;
|
||||
DeviceIntPtr darwinTablet = NULL;
|
||||
|
|
|
@ -79,6 +79,7 @@ extern int darwinMouseAccelChange;
|
|||
extern int darwinFakeButtons;
|
||||
extern int darwinFakeMouse2Mask;
|
||||
extern int darwinFakeMouse3Mask;
|
||||
extern int darwinAppKitModMask;
|
||||
extern char *darwinKeymapFile;
|
||||
extern int darwinSyncKeymap;
|
||||
extern unsigned int darwinDesiredWidth, darwinDesiredHeight;
|
||||
|
|
Loading…
Reference in New Issue