Merge remote branch 'jeremyhu/master'
This commit is contained in:
commit
7442f3355a
|
@ -1673,7 +1673,7 @@ AllowSome(ClientPtr client,
|
||||||
thisGrabbed = grabinfo->grab && SameClient(grabinfo->grab, client);
|
thisGrabbed = grabinfo->grab && SameClient(grabinfo->grab, client);
|
||||||
thisSynced = FALSE;
|
thisSynced = FALSE;
|
||||||
otherGrabbed = FALSE;
|
otherGrabbed = FALSE;
|
||||||
othersFrozen = TRUE;
|
othersFrozen = FALSE;
|
||||||
grabTime = grabinfo->grabTime;
|
grabTime = grabinfo->grabTime;
|
||||||
for (dev = inputInfo.devices; dev; dev = dev->next)
|
for (dev = inputInfo.devices; dev; dev = dev->next)
|
||||||
{
|
{
|
||||||
|
@ -1689,11 +1689,9 @@ AllowSome(ClientPtr client,
|
||||||
otherGrabbed = TRUE;
|
otherGrabbed = TRUE;
|
||||||
if (grabinfo->sync.other == devgrabinfo->grab)
|
if (grabinfo->sync.other == devgrabinfo->grab)
|
||||||
thisSynced = TRUE;
|
thisSynced = TRUE;
|
||||||
if (devgrabinfo->sync.state < FROZEN)
|
if (devgrabinfo->sync.state >= FROZEN)
|
||||||
othersFrozen = FALSE;
|
othersFrozen = TRUE;
|
||||||
}
|
}
|
||||||
else if (!devgrabinfo->sync.other || !SameClient(devgrabinfo->sync.other, client))
|
|
||||||
othersFrozen = FALSE;
|
|
||||||
}
|
}
|
||||||
if (!((thisGrabbed && grabinfo->sync.state >= FROZEN) || thisSynced))
|
if (!((thisGrabbed && grabinfo->sync.state >= FROZEN) || thisSynced))
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -961,6 +961,12 @@ void X11ApplicationMain (int argc, char **argv, char **envp) {
|
||||||
/* not reached */
|
/* not reached */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void launch_client(const char *cmd) {
|
||||||
|
NSString *string = [[NSString alloc] initWithUTF8String:cmd];
|
||||||
|
[[X11App controller] launch_client:string];
|
||||||
|
[string release];
|
||||||
|
}
|
||||||
|
|
||||||
@implementation X11Application (Private)
|
@implementation X11Application (Private)
|
||||||
|
|
||||||
#ifdef NX_DEVICELCMDKEYMASK
|
#ifdef NX_DEVICELCMDKEYMASK
|
||||||
|
|
|
@ -144,5 +144,6 @@ typedef unsigned int NSUInteger;
|
||||||
#endif /* __OBJC__ */
|
#endif /* __OBJC__ */
|
||||||
|
|
||||||
void X11ControllerMain(int argc, char **argv, char **envp);
|
void X11ControllerMain(int argc, char **argv, char **envp);
|
||||||
|
void launch_client(const char *cmd);
|
||||||
|
|
||||||
#endif /* X11CONTROLLER_H */
|
#endif /* X11CONTROLLER_H */
|
||||||
|
|
|
@ -52,6 +52,8 @@
|
||||||
#include "quartzKeyboard.h"
|
#include "quartzKeyboard.h"
|
||||||
#include "quartzAudio.h"
|
#include "quartzAudio.h"
|
||||||
|
|
||||||
|
#include "X11Application.h"
|
||||||
|
|
||||||
#include "threadSafety.h"
|
#include "threadSafety.h"
|
||||||
|
|
||||||
#ifdef NDEBUG
|
#ifdef NDEBUG
|
||||||
|
@ -359,6 +361,10 @@ void DarwinKeyboardReloadHandler(void) {
|
||||||
CFIndex initialKeyRepeatValue, keyRepeatValue;
|
CFIndex initialKeyRepeatValue, keyRepeatValue;
|
||||||
BOOL ok;
|
BOOL ok;
|
||||||
DeviceIntPtr pDev = darwinKeyboard;
|
DeviceIntPtr pDev = darwinKeyboard;
|
||||||
|
const char *xmodmap = PROJECTROOT "/bin/xmodmap";
|
||||||
|
const char *sysmodmap = PROJECTROOT "/lib/X11/xinit/.Xmodmap";
|
||||||
|
const char *homedir = getenv("HOME");
|
||||||
|
char usermodmap[PATH_MAX], cmd[PATH_MAX];
|
||||||
|
|
||||||
DEBUG_LOG("DarwinKeyboardReloadHandler\n");
|
DEBUG_LOG("DarwinKeyboardReloadHandler\n");
|
||||||
|
|
||||||
|
@ -397,6 +403,23 @@ void DarwinKeyboardReloadHandler(void) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} pthread_mutex_unlock(&keyInfo_mutex);
|
} pthread_mutex_unlock(&keyInfo_mutex);
|
||||||
|
|
||||||
|
/* Check for system .Xmodmap */
|
||||||
|
if (access(xmodmap, F_OK) == 0) {
|
||||||
|
if (access(sysmodmap, F_OK) == 0) {
|
||||||
|
snprintf (cmd, sizeof(cmd), "%s %s", xmodmap, sysmodmap);
|
||||||
|
launch_client(cmd);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Check for user's local .Xmodmap */
|
||||||
|
if (homedir != NULL) {
|
||||||
|
snprintf (usermodmap, sizeof(usermodmap), "%s/.Xmodmap", homedir);
|
||||||
|
if (access(usermodmap, F_OK) == 0) {
|
||||||
|
snprintf (cmd, sizeof(cmd), "%s %s", xmodmap, usermodmap);
|
||||||
|
launch_client(cmd);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue
Block a user