[Xquartz-changes] xserver: Branch 'master' - 5 commits
Jeremy Huddleston
jeremyhu at freedesktop.org
Mon Nov 9 13:13:56 PST 2009
Rebased ref, commits from common ancestor:
commit bfae26f3f05225196ae0918f7aea784abc708d1a
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date: Mon Nov 9 13:09:55 2009 -0800
XQuartz: Explicitly pass a bellProc to make XBell() work again.
Signed-off-by: Jeremy Huddleston <jeremyhu at freedesktop.org>
diff --git a/hw/xquartz/quartzKeyboard.c b/hw/xquartz/quartzKeyboard.c
index 90f6610..00567b8 100644
--- a/hw/xquartz/quartzKeyboard.c
+++ b/hw/xquartz/quartzKeyboard.c
@@ -183,6 +183,12 @@ static void DarwinChangeKeyboardControl(DeviceIntPtr device, KeybdCtrl *ctrl) {
// keyclick, bell volume / pitch, autorepead, LED's
}
+static void DarwinKeyboardBell(int volume, DeviceIntPtr pDev, pointer arg, int something) {
+ KeybdCtrl *ctrl = arg;
+
+ DDXRingBell(volume, ctrl->bell_pitch, ctrl->bell_duration);
+}
+
//-----------------------------------------------------------------------------
// Utility functions to help parse Darwin keymap
//-----------------------------------------------------------------------------
@@ -296,7 +302,7 @@ void DarwinKeyboardInit(DeviceIntPtr pDev) {
/* We need to really have rules... or something... */
//XkbSetRulesDflts("base", "pc105", "us", NULL, NULL);
- InitKeyboardDeviceStruct(pDev, NULL, NULL, DarwinChangeKeyboardControl);
+ InitKeyboardDeviceStruct(pDev, NULL, DarwinKeyboardBell, DarwinChangeKeyboardControl);
DarwinKeyboardReloadHandler();
commit dd8d4b8aed55dae56da4f9af06847fe66162157e
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date: Tue Oct 27 17:16:57 2009 -0700
XQuartz: pbproxy: Wait for the server to finish starting up, so display is valid.
Signed-off-by: Jeremy Huddleston <jeremyhu at freedesktop.org>
diff --git a/hw/xquartz/pbproxy/app-main.m b/hw/xquartz/pbproxy/app-main.m
index d4b43c6..f3f683a 100644
--- a/hw/xquartz/pbproxy/app-main.m
+++ b/hw/xquartz/pbproxy/app-main.m
@@ -37,7 +37,11 @@
static const char *app_prefs_domain = "org.x.X11";
CFStringRef app_prefs_domain_cfstr;
+/* Stubs */
char *display = NULL;
+BOOL serverInitComplete = YES;
+pthread_mutex_t serverInitCompleteMutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_cond_t serverInitCompleteCond = PTHREAD_COND_INITIALIZER;
static void signal_handler (int sig) {
switch(sig) {
diff --git a/hw/xquartz/pbproxy/main.m b/hw/xquartz/pbproxy/main.m
index 5bc5182..d26b1b1 100644
--- a/hw/xquartz/pbproxy/main.m
+++ b/hw/xquartz/pbproxy/main.m
@@ -47,6 +47,20 @@ BOOL xpbproxy_is_standalone = NO;
x_selection *_selection_object;
+extern BOOL serverInitComplete;
+extern pthread_mutex_t serverInitCompleteMutex;
+extern pthread_cond_t serverInitCompleteCond;
+
+static inline void wait_for_server_init(void) {
+ /* If the server hasn't finished initializing, wait for it... */
+ if(!serverInitComplete) {
+ pthread_mutex_lock(&serverInitCompleteMutex);
+ while(!serverInitComplete)
+ pthread_cond_wait(&serverInitCompleteCond, &serverInitCompleteMutex);
+ pthread_mutex_unlock(&serverInitCompleteMutex);
+ }
+}
+
static int x_io_error_handler (Display *dpy) {
/* We lost our connection to the server. */
@@ -85,6 +99,8 @@ static void *xpbproxy_x_thread(void *args) {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
size_t i;
+ wait_for_server_init();
+
for(i=0, xpbproxy_dpy=NULL; !xpbproxy_dpy && i<5; i++) {
xpbproxy_dpy = XOpenDisplay(NULL);
commit 05e238cfbd8c27f10d07018292e29f2cb551940c
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date: Sun Nov 8 20:25:42 2009 -0800
XQuartz: Buildfix for Leopard and older
Signed-off-by: Jeremy Huddleston <jeremyhu at freedesktop.org>
diff --git a/hw/xquartz/X11Controller.h b/hw/xquartz/X11Controller.h
index bb28447..9e16f75 100644
--- a/hw/xquartz/X11Controller.h
+++ b/hw/xquartz/X11Controller.h
@@ -55,7 +55,11 @@ typedef unsigned int NSUInteger;
#endif
#endif
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
@interface X11Controller : NSObject <NSTableViewDataSource>
+#else
+ at interface X11Controller : NSObject
+#endif
{
IBOutlet NSPanel *prefs_panel;
commit c7d1319872e0ae0b7d945e9af8c4027ee5aa2055
Author: Adam Jackson <ajax at redhat.com>
Date: Mon Nov 9 11:12:22 2009 -0500
randr: Fill in errorValue when verifying outputs/crtcs/modes
Signed-off-by: Adam Jackson <ajax at redhat.com>
Signed-off-by: Keith Packard <keithp at keithp.com>
diff --git a/randr/randrstr.h b/randr/randrstr.h
index af14374..975fe33 100644
--- a/randr/randrstr.h
+++ b/randr/randrstr.h
@@ -344,24 +344,30 @@ extern _X_EXPORT RESTYPE RRCrtcType, RRModeType, RROutputType;
{\
int rc = dixLookupResourceByType((pointer *)&(ptr), id,\
RROutputType, client, a);\
- if (rc != Success)\
+ if (rc != Success) {\
+ client->errorValue = id;\
return (rc == BadValue) ? RRErrorBase + BadRROutput : rc;\
+ }\
}
#define VERIFY_RR_CRTC(id, ptr, a)\
{\
int rc = dixLookupResourceByType((pointer *)&(ptr), id,\
RRCrtcType, client, a);\
- if (rc != Success)\
+ if (rc != Success) {\
+ client->errorValue = id;\
return (rc == BadValue) ? RRErrorBase + BadRRCrtc : rc;\
+ }\
}
#define VERIFY_RR_MODE(id, ptr, a)\
{\
int rc = dixLookupResourceByType((pointer *)&(ptr), id,\
RRModeType, client, a);\
- if (rc != Success)\
+ if (rc != Success) {\
+ client->errorValue = id;\
return (rc == BadValue) ? RRErrorBase + BadRRMode : rc;\
+ }\
}
#define GetRRClient(pClient) ((RRClientPtr)dixLookupPrivate(&(pClient)->devPrivates, RRClientPrivateKey))
commit d85ab6b6483d6ca7d9d22298d05ed1fa3076b042
Author: Dave Airlie <airlied at redhat.com>
Date: Tue Oct 13 10:15:00 2009 +1000
loader: actually stat something that has some chance of existing. (v2)
FindModuleInSubdir seems to expect a / at the end of the subdir its
finding for, so we add the / early, the stat will fail if its
not a subdir, I'm leaving the S_ISDIR in just in case there is another
reason it could return 0. This does look a bit silly in strace
but it seems to work fine.
I have a very intermittent issue where drivers loses its / that
I've been seeing on/off for a while, this may or may not fix it.
Signed-off-by: Dave Airlie <airlied at redhat.com>
Reviewed-by: Julien Cristau <jcristau at debian.org>
Signed-off-by: Keith Packard <keithp at keithp.com>
diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c
index 0b220f1..5b175a5 100644
--- a/hw/xfree86/loader/loadmod.c
+++ b/hw/xfree86/loader/loadmod.c
@@ -399,8 +399,11 @@ FindModuleInSubdir(const char *dirpath, const char *module)
while ((direntry = readdir(dir))) {
if (direntry->d_name[0] == '.')
continue;
- if ((stat(direntry->d_name, &stat_buf) == 0) && S_ISDIR(stat_buf.st_mode)) {
- snprintf(tmpBuf, PATH_MAX, "%s/%s", dirpath, direntry->d_name);
+ snprintf(tmpBuf, PATH_MAX, "%s%s/", dirpath, direntry->d_name);
+ /* the stat with the appended / fails for normal files,
+ and works for sub dirs fine, looks a bit strange in strace
+ but does seem to work */
+ if ((stat(tmpBuf, &stat_buf) == 0) && S_ISDIR(stat_buf.st_mode)) {
if ((ret = FindModuleInSubdir(tmpBuf, module)))
break;
continue;
More information about the Xquartz-changes
mailing list