summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@freedesktop.org>2009-09-27 22:57:25 -0700
committerJeremy Huddleston <jeremyhu@freedesktop.org>2009-09-27 22:57:25 -0700
commit54000bdcbca52a2de31f7c1a1147de6d8e9dbbb8 (patch)
tree3c330ff46711ddf2b594bfec5898f62e7006e1cc
parent29cb904e4de2411a9b6dbe68694954788f0525f7 (diff)
XQuartz: Fix a bunch of compilation warnings about style
-rw-r--r--hw/xquartz/GL/visualConfigs.c2
-rw-r--r--hw/xquartz/X11Application.m17
-rw-r--r--hw/xquartz/X11Controller.m4
-rw-r--r--hw/xquartz/applewm.c19
-rw-r--r--hw/xquartz/darwinEvents.c5
-rw-r--r--hw/xquartz/mach-startup/bundle-main.c15
-rw-r--r--hw/xquartz/mach-startup/launchd_fd.c2
-rw-r--r--hw/xquartz/mach-startup/stub.c16
-rw-r--r--hw/xquartz/quartz.c2
-rw-r--r--hw/xquartz/quartz.h2
-rw-r--r--hw/xquartz/quartzAudio.c2
-rw-r--r--hw/xquartz/xpr/appledri.c2
-rw-r--r--hw/xquartz/xpr/x-hash.h2
-rw-r--r--hw/xquartz/xpr/xprFrame.c8
-rw-r--r--hw/xquartz/xpr/xprScreen.c4
15 files changed, 53 insertions, 49 deletions
diff --git a/hw/xquartz/GL/visualConfigs.c b/hw/xquartz/GL/visualConfigs.c
index fee665d1d..f92677847 100644
--- a/hw/xquartz/GL/visualConfigs.c
+++ b/hw/xquartz/GL/visualConfigs.c
@@ -277,7 +277,7 @@ __GLXconfig *__glXAquaCreateVisualConfigs(int *numConfigsPtr, int screenNumber)
277 (c-1)->next = NULL; 277 (c-1)->next = NULL;
278 278
279 if (c - visualConfigs != numConfigs) { 279 if (c - visualConfigs != numConfigs) {
280 FatalError("numConfigs calculation error in setVisualConfigs! numConfigs is %d i is %d\n", numConfigs, c - visualConfigs); 280 FatalError("numConfigs calculation error in setVisualConfigs! numConfigs is %d i is %d\n", numConfigs, (int)(c - visualConfigs));
281 } 281 }
282 282
283 freeGlCapabilities(&caps); 283 freeGlCapabilities(&caps);
diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index ad022c9ab..749a8932b 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -243,23 +243,26 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
243 if(!for_appkit) { 243 if(!for_appkit) {
244 NSPoint NSlocation = [e locationInWindow]; 244 NSPoint NSlocation = [e locationInWindow];
245 NSWindow *window = [e window]; 245 NSWindow *window = [e window];
246 246 NSRect NSframe, NSvisibleFrame;
247 CGRect CGframe, CGvisibleFrame;
248 CGPoint CGlocation;
249
247 if (window != nil) { 250 if (window != nil) {
248 NSRect frame = [window frame]; 251 NSRect frame = [window frame];
249 NSlocation.x += frame.origin.x; 252 NSlocation.x += frame.origin.x;
250 NSlocation.y += frame.origin.y; 253 NSlocation.y += frame.origin.y;
251 } 254 }
252 255
253 NSRect NSframe = [[NSScreen mainScreen] frame]; 256 NSframe = [[NSScreen mainScreen] frame];
254 NSRect NSvisibleFrame = [[NSScreen mainScreen] visibleFrame]; 257 NSvisibleFrame = [[NSScreen mainScreen] visibleFrame];
255 258
256 CGRect CGframe = CGRectMake(NSframe.origin.x, NSframe.origin.y, 259 CGframe = CGRectMake(NSframe.origin.x, NSframe.origin.y,
257 NSframe.size.width, NSframe.size.height); 260 NSframe.size.width, NSframe.size.height);
258 CGRect CGvisibleFrame = CGRectMake(NSvisibleFrame.origin.x, 261 CGvisibleFrame = CGRectMake(NSvisibleFrame.origin.x,
259 NSvisibleFrame.origin.y, 262 NSvisibleFrame.origin.y,
260 NSvisibleFrame.size.width, 263 NSvisibleFrame.size.width,
261 NSvisibleFrame.size.height); 264 NSvisibleFrame.size.height);
262 CGPoint CGlocation = CGPointMake(NSlocation.x, NSlocation.y); 265 CGlocation = CGPointMake(NSlocation.x, NSlocation.y);
263 266
264 if(CGRectContainsPoint(CGframe, CGlocation) && 267 if(CGRectContainsPoint(CGframe, CGlocation) &&
265 !CGRectContainsPoint(CGvisibleFrame, CGlocation)) 268 !CGRectContainsPoint(CGvisibleFrame, CGlocation))
@@ -334,6 +337,7 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
334 case NSApplicationActivatedEventType: 337 case NSApplicationActivatedEventType:
335 for_x = NO; 338 for_x = NO;
336 if ([self modalWindow] == nil) { 339 if ([self modalWindow] == nil) {
340 BOOL switch_on_activate, ok;
337 for_appkit = NO; 341 for_appkit = NO;
338 342
339 /* FIXME: hack to avoid having to pass the event to appkit, 343 /* FIXME: hack to avoid having to pass the event to appkit,
@@ -344,7 +348,6 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
344 348
345 /* Get the Spaces preference for SwitchOnActivate */ 349 /* Get the Spaces preference for SwitchOnActivate */
346 (void)CFPreferencesAppSynchronize(CFSTR(".GlobalPreferences")); 350 (void)CFPreferencesAppSynchronize(CFSTR(".GlobalPreferences"));
347 BOOL switch_on_activate, ok;
348 switch_on_activate = CFPreferencesGetAppBooleanValue(CFSTR("AppleSpacesSwitchOnActivate"), CFSTR(".GlobalPreferences"), &ok); 351 switch_on_activate = CFPreferencesGetAppBooleanValue(CFSTR("AppleSpacesSwitchOnActivate"), CFSTR(".GlobalPreferences"), &ok);
349 if(!ok) 352 if(!ok)
350 switch_on_activate = YES; 353 switch_on_activate = YES;
diff --git a/hw/xquartz/X11Controller.m b/hw/xquartz/X11Controller.m
index f58747e15..d8d23ec2f 100644
--- a/hw/xquartz/X11Controller.m
+++ b/hw/xquartz/X11Controller.m
@@ -632,6 +632,8 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row
632 632
633- (IBAction)prefs_changed:sender 633- (IBAction)prefs_changed:sender
634{ 634{
635 BOOL pbproxy_active;
636
635 darwinFakeButtons = [fake_buttons intValue]; 637 darwinFakeButtons = [fake_buttons intValue];
636 quartzUseSysBeep = [use_sysbeep intValue]; 638 quartzUseSysBeep = [use_sysbeep intValue];
637 X11EnableKeyEquivalents = [enable_keyequivs intValue]; 639 X11EnableKeyEquivalents = [enable_keyequivs intValue];
@@ -653,7 +655,7 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row
653 [NSApp prefs_set_boolean:@PREFS_NO_TCP value:![enable_tcp intValue]]; 655 [NSApp prefs_set_boolean:@PREFS_NO_TCP value:![enable_tcp intValue]];
654 [NSApp prefs_set_integer:@PREFS_DEPTH value:[depth selectedTag]]; 656 [NSApp prefs_set_integer:@PREFS_DEPTH value:[depth selectedTag]];
655 657
656 BOOL pbproxy_active = [sync_pasteboard intValue]; 658 pbproxy_active = [sync_pasteboard intValue];
657 659
658 [NSApp prefs_set_boolean:@PREFS_SYNC_PB value:pbproxy_active]; 660 [NSApp prefs_set_boolean:@PREFS_SYNC_PB value:pbproxy_active];
659 [NSApp prefs_set_boolean:@PREFS_SYNC_PB_TO_CLIPBOARD value:[sync_pasteboard_to_clipboard intValue]]; 661 [NSApp prefs_set_boolean:@PREFS_SYNC_PB_TO_CLIPBOARD value:[sync_pasteboard_to_clipboard intValue]];
diff --git a/hw/xquartz/applewm.c b/hw/xquartz/applewm.c
index 14be180a1..d2cca13f3 100644
--- a/hw/xquartz/applewm.c
+++ b/hw/xquartz/applewm.c
@@ -210,10 +210,7 @@ updateEventMask (WMEventPtr *pHead)
210 210
211/*ARGSUSED*/ 211/*ARGSUSED*/
212static int 212static int
213WMFreeClient (data, id) 213WMFreeClient (pointer data, XID id) {
214 pointer data;
215 XID id;
216{
217 WMEventPtr pEvent; 214 WMEventPtr pEvent;
218 WMEventPtr *pHead, pCur, pPrev; 215 WMEventPtr *pHead, pCur, pPrev;
219 216
@@ -237,10 +234,7 @@ WMFreeClient (data, id)
237 234
238/*ARGSUSED*/ 235/*ARGSUSED*/
239static int 236static int
240WMFreeEvents (data, id) 237WMFreeEvents (pointer data, XID id) {
241 pointer data;
242 XID id;
243{
244 WMEventPtr *pHead, pCur, pNext; 238 WMEventPtr *pHead, pCur, pNext;
245 239
246 pHead = (WMEventPtr *) data; 240 pHead = (WMEventPtr *) data;
@@ -344,10 +338,7 @@ ProcAppleWMSelectInput (register ClientPtr client)
344 */ 338 */
345 339
346void 340void
347AppleWMSendEvent (type, mask, which, arg) 341AppleWMSendEvent (int type, unsigned int mask, int which, int arg) {
348 int type, which, arg;
349 unsigned int mask;
350{
351 WMEventPtr *pHead, pEvent; 342 WMEventPtr *pHead, pEvent;
352 ClientPtr client; 343 ClientPtr client;
353 xAppleWMNotifyEvent se; 344 xAppleWMNotifyEvent se;
@@ -712,9 +703,7 @@ ProcAppleWMDispatch (
712} 703}
713 704
714static void 705static void
715SNotifyEvent(from, to) 706SNotifyEvent(xAppleWMNotifyEvent *from, xAppleWMNotifyEvent *to) {
716 xAppleWMNotifyEvent *from, *to;
717{
718 to->type = from->type; 707 to->type = from->type;
719 to->kind = from->kind; 708 to->kind = from->kind;
720 cpswaps (from->sequenceNumber, to->sequenceNumber); 709 cpswaps (from->sequenceNumber, to->sequenceNumber);
diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c
index d300cce05..421efcedf 100644
--- a/hw/xquartz/darwinEvents.c
+++ b/hw/xquartz/darwinEvents.c
@@ -513,13 +513,14 @@ void DarwinSendProximityEvents(int ev_type, float pointer_x, float pointer_y) {
513void DarwinSendScrollEvents(float count_x, float count_y, 513void DarwinSendScrollEvents(float count_x, float count_y,
514 float pointer_x, float pointer_y, 514 float pointer_x, float pointer_y,
515 float pressure, float tilt_x, float tilt_y) { 515 float pressure, float tilt_x, float tilt_y) {
516 int sign_x, sign_y;
516 if(!darwinEvents) { 517 if(!darwinEvents) {
517 DEBUG_LOG("DarwinSendScrollEvents called before darwinEvents was initialized\n"); 518 DEBUG_LOG("DarwinSendScrollEvents called before darwinEvents was initialized\n");
518 return; 519 return;
519 } 520 }
520 521
521 int sign_x = count_x > 0.0f ? SCROLLWHEELLEFTFAKE : SCROLLWHEELRIGHTFAKE; 522 sign_x = count_x > 0.0f ? SCROLLWHEELLEFTFAKE : SCROLLWHEELRIGHTFAKE;
522 int sign_y = count_y > 0.0f ? SCROLLWHEELUPFAKE : SCROLLWHEELDOWNFAKE; 523 sign_y = count_y > 0.0f ? SCROLLWHEELUPFAKE : SCROLLWHEELDOWNFAKE;
523 count_x = fabs(count_x); 524 count_x = fabs(count_x);
524 count_y = fabs(count_y); 525 count_y = fabs(count_y);
525 526
diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c
index e887c469d..917bbafbe 100644
--- a/hw/xquartz/mach-startup/bundle-main.c
+++ b/hw/xquartz/mach-startup/bundle-main.c
@@ -149,15 +149,17 @@ static int accept_fd_handoff(int connected_fd) {
149 char databuf[] = "display"; 149 char databuf[] = "display";
150 struct iovec iov[1]; 150 struct iovec iov[1];
151 151
152 iov[0].iov_base = databuf;
153 iov[0].iov_len = sizeof(databuf);
154
155 union { 152 union {
156 struct cmsghdr hdr; 153 struct cmsghdr hdr;
157 char bytes[CMSG_SPACE(sizeof(int))]; 154 char bytes[CMSG_SPACE(sizeof(int))];
158 } buf; 155 } buf;
159 156
160 struct msghdr msg; 157 struct msghdr msg;
158 struct cmsghdr *cmsg;
159
160 iov[0].iov_base = databuf;
161 iov[0].iov_len = sizeof(databuf);
162
161 msg.msg_iov = iov; 163 msg.msg_iov = iov;
162 msg.msg_iovlen = 1; 164 msg.msg_iovlen = 1;
163 msg.msg_control = buf.bytes; 165 msg.msg_control = buf.bytes;
@@ -166,7 +168,7 @@ static int accept_fd_handoff(int connected_fd) {
166 msg.msg_namelen = 0; 168 msg.msg_namelen = 0;
167 msg.msg_flags = 0; 169 msg.msg_flags = 0;
168 170
169 struct cmsghdr *cmsg = CMSG_FIRSTHDR (&msg); 171 cmsg = CMSG_FIRSTHDR (&msg);
170 cmsg->cmsg_level = SOL_SOCKET; 172 cmsg->cmsg_level = SOL_SOCKET;
171 cmsg->cmsg_type = SCM_RIGHTS; 173 cmsg->cmsg_type = SCM_RIGHTS;
172 cmsg->cmsg_len = CMSG_LEN(sizeof(int)); 174 cmsg->cmsg_len = CMSG_LEN(sizeof(int));
@@ -197,6 +199,7 @@ static void socket_handoff_thread(void *arg) {
197 socket_handoff_t *handoff_data = (socket_handoff_t *)arg; 199 socket_handoff_t *handoff_data = (socket_handoff_t *)arg;
198 int launchd_fd = -1; 200 int launchd_fd = -1;
199 int connected_fd; 201 int connected_fd;
202 unsigned remain;
200 203
201 /* Now actually get the passed file descriptor from this connection 204 /* Now actually get the passed file descriptor from this connection
202 * If we encounter an error, keep listening. 205 * If we encounter an error, keep listening.
@@ -229,7 +232,7 @@ static void socket_handoff_thread(void *arg) {
229 * into it. 232 * into it.
230 */ 233 */
231 234
232 unsigned remain = 3000000; 235 remain = 3000000;
233 fprintf(stderr, "X11.app: Received new $DISPLAY fd: %d ... sleeping to allow xinitrc to catchup.\n", launchd_fd); 236 fprintf(stderr, "X11.app: Received new $DISPLAY fd: %d ... sleeping to allow xinitrc to catchup.\n", launchd_fd);
234 while((remain = usleep(remain)) > 0); 237 while((remain = usleep(remain)) > 0);
235 238
@@ -626,11 +629,11 @@ static char *command_from_prefs(const char *key, const char *default_value) {
626 629
627 if ((PlistRef == NULL) || (CFGetTypeID(PlistRef) != CFStringGetTypeID())) { 630 if ((PlistRef == NULL) || (CFGetTypeID(PlistRef) != CFStringGetTypeID())) {
628 CFStringRef cfDefaultValue = CFStringCreateWithCString(NULL, default_value, kCFStringEncodingASCII); 631 CFStringRef cfDefaultValue = CFStringCreateWithCString(NULL, default_value, kCFStringEncodingASCII);
632 int len = strlen(default_value) + 1;
629 633
630 CFPreferencesSetAppValue(cfKey, cfDefaultValue, kCFPreferencesCurrentApplication); 634 CFPreferencesSetAppValue(cfKey, cfDefaultValue, kCFPreferencesCurrentApplication);
631 CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication); 635 CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication);
632 636
633 int len = strlen(default_value) + 1;
634 command = (char *)malloc(len * sizeof(char)); 637 command = (char *)malloc(len * sizeof(char));
635 if(!command) 638 if(!command)
636 return NULL; 639 return NULL;
diff --git a/hw/xquartz/mach-startup/launchd_fd.c b/hw/xquartz/mach-startup/launchd_fd.c
index fa623ea12..6dace8ea1 100644
--- a/hw/xquartz/mach-startup/launchd_fd.c
+++ b/hw/xquartz/mach-startup/launchd_fd.c
@@ -36,7 +36,7 @@
36 36
37#include "launchd_fd.h" 37#include "launchd_fd.h"
38 38
39int launchd_display_fd() { 39int launchd_display_fd(void) {
40 launch_data_t sockets_dict, checkin_request, checkin_response; 40 launch_data_t sockets_dict, checkin_request, checkin_response;
41 launch_data_t listening_fd_array, listening_fd; 41 launch_data_t listening_fd_array, listening_fd;
42 42
diff --git a/hw/xquartz/mach-startup/stub.c b/hw/xquartz/mach-startup/stub.c
index fd831a828..3d22db5d1 100644
--- a/hw/xquartz/mach-startup/stub.c
+++ b/hw/xquartz/mach-startup/stub.c
@@ -69,13 +69,12 @@ static char x11_path[PATH_MAX + 1];
69 69
70static pid_t x11app_pid = 0; 70static pid_t x11app_pid = 0;
71 71
72static void set_x11_path() { 72static void set_x11_path(void) {
73#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050 73#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
74 74
75 CFURLRef appURL = NULL; 75 CFURLRef appURL = NULL;
76 CFBundleRef bundle = NULL; 76 CFBundleRef bundle = NULL;
77 OSStatus osstatus = LSFindApplicationForInfo(kLSUnknownCreator, CFSTR(kX11AppBundleId), nil, nil, &appURL); 77 OSStatus osstatus = LSFindApplicationForInfo(kLSUnknownCreator, CFSTR(kX11AppBundleId), nil, nil, &appURL);
78 UInt32 ver;
79 78
80 switch (osstatus) { 79 switch (osstatus) {
81 case noErr: 80 case noErr:
@@ -148,15 +147,17 @@ static void send_fd_handoff(int connected_fd, int launchd_fd) {
148 char databuf[] = "display"; 147 char databuf[] = "display";
149 struct iovec iov[1]; 148 struct iovec iov[1];
150 149
151 iov[0].iov_base = databuf;
152 iov[0].iov_len = sizeof(databuf);
153
154 union { 150 union {
155 struct cmsghdr hdr; 151 struct cmsghdr hdr;
156 char bytes[CMSG_SPACE(sizeof(int))]; 152 char bytes[CMSG_SPACE(sizeof(int))];
157 } buf; 153 } buf;
158 154
159 struct msghdr msg; 155 struct msghdr msg;
156 struct cmsghdr *cmsg;
157
158 iov[0].iov_base = databuf;
159 iov[0].iov_len = sizeof(databuf);
160
160 msg.msg_iov = iov; 161 msg.msg_iov = iov;
161 msg.msg_iovlen = 1; 162 msg.msg_iovlen = 1;
162 msg.msg_control = buf.bytes; 163 msg.msg_control = buf.bytes;
@@ -165,7 +166,7 @@ static void send_fd_handoff(int connected_fd, int launchd_fd) {
165 msg.msg_namelen = 0; 166 msg.msg_namelen = 0;
166 msg.msg_flags = 0; 167 msg.msg_flags = 0;
167 168
168 struct cmsghdr *cmsg = CMSG_FIRSTHDR (&msg); 169 cmsg = CMSG_FIRSTHDR (&msg);
169 cmsg->cmsg_level = SOL_SOCKET; 170 cmsg->cmsg_level = SOL_SOCKET;
170 cmsg->cmsg_type = SCM_RIGHTS; 171 cmsg->cmsg_type = SCM_RIGHTS;
171 cmsg->cmsg_len = CMSG_LEN(sizeof(int)); 172 cmsg->cmsg_len = CMSG_LEN(sizeof(int));
@@ -231,10 +232,11 @@ int main(int argc, char **argv, char **envp) {
231 232
232 kr = bootstrap_look_up(bootstrap_port, server_bootstrap_name, &mp); 233 kr = bootstrap_look_up(bootstrap_port, server_bootstrap_name, &mp);
233 if(kr != KERN_SUCCESS) { 234 if(kr != KERN_SUCCESS) {
235 pid_t child;
234 set_x11_path(); 236 set_x11_path();
235 237
236 /* This forking is ugly and will be cleaned up later */ 238 /* This forking is ugly and will be cleaned up later */
237 pid_t child = fork(); 239 child = fork();
238 if(child == -1) { 240 if(child == -1) {
239 fprintf(stderr, "Xquartz: Could not fork: %s\n", strerror(errno)); 241 fprintf(stderr, "Xquartz: Could not fork: %s\n", strerror(errno));
240 return EXIT_FAILURE; 242 return EXIT_FAILURE;
diff --git a/hw/xquartz/quartz.c b/hw/xquartz/quartz.c
index 64933135d..c4142a801 100644
--- a/hw/xquartz/quartz.c
+++ b/hw/xquartz/quartz.c
@@ -366,7 +366,7 @@ void QuartzSetRootless(Bool state) {
366 * Calls mode specific screen resume to restore the X clip regions 366 * Calls mode specific screen resume to restore the X clip regions
367 * (if needed) and the X server cursor state. 367 * (if needed) and the X server cursor state.
368 */ 368 */
369void QuartzShow() { 369void QuartzShow(void) {
370 int i; 370 int i;
371 371
372 if (quartzServerVisible) 372 if (quartzServerVisible)
diff --git a/hw/xquartz/quartz.h b/hw/xquartz/quartz.h
index 64ef122ae..b1a3f3183 100644
--- a/hw/xquartz/quartz.h
+++ b/hw/xquartz/quartz.h
@@ -130,4 +130,6 @@ void QuartzSpaceChanged(uint32_t space_id);
130 130
131void QuartzSetFullscreen(Bool state); 131void QuartzSetFullscreen(Bool state);
132void QuartzSetRootless(Bool state); 132void QuartzSetRootless(Bool state);
133
134int server_main(int argc, char **argv, char **envp);
133#endif 135#endif
diff --git a/hw/xquartz/quartzAudio.c b/hw/xquartz/quartzAudio.c
index 8cf241738..af63d18f5 100644
--- a/hw/xquartz/quartzAudio.c
+++ b/hw/xquartz/quartzAudio.c
@@ -311,8 +311,10 @@ void QuartzAudioInit(void)
311 311
312 // Prepare for playback 312 // Prepare for playback
313#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050 313#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
314 {
314 AudioDeviceIOProcID sInputIOProcID = NULL; 315 AudioDeviceIOProcID sInputIOProcID = NULL;
315 status = AudioDeviceCreateIOProcID( outputDevice, QuartzAudioIOProc, &data, &sInputIOProcID ); 316 status = AudioDeviceCreateIOProcID( outputDevice, QuartzAudioIOProc, &data, &sInputIOProcID );
317 }
316#else 318#else
317 status = AudioDeviceAddIOProc(outputDevice, QuartzAudioIOProc, &data); 319 status = AudioDeviceAddIOProc(outputDevice, QuartzAudioIOProc, &data);
318#endif 320#endif
diff --git a/hw/xquartz/xpr/appledri.c b/hw/xquartz/xpr/appledri.c
index 835ccabaf..74a4ec315 100644
--- a/hw/xquartz/xpr/appledri.c
+++ b/hw/xquartz/xpr/appledri.c
@@ -255,10 +255,10 @@ ProcAppleDRIDestroySurface(
255 register ClientPtr client 255 register ClientPtr client
256) 256)
257{ 257{
258 int rc;
258 REQUEST(xAppleDRIDestroySurfaceReq); 259 REQUEST(xAppleDRIDestroySurfaceReq);
259 DrawablePtr pDrawable; 260 DrawablePtr pDrawable;
260 REQUEST_SIZE_MATCH(xAppleDRIDestroySurfaceReq); 261 REQUEST_SIZE_MATCH(xAppleDRIDestroySurfaceReq);
261 int rc;
262 262
263 rc = dixLookupDrawable(&pDrawable, stuff->drawable, client, 0, 263 rc = dixLookupDrawable(&pDrawable, stuff->drawable, client, 0,
264 DixReadAccess); 264 DixReadAccess);
diff --git a/hw/xquartz/xpr/x-hash.h b/hw/xquartz/xpr/x-hash.h
index 78bc7b317..f876b6b71 100644
--- a/hw/xquartz/xpr/x-hash.h
+++ b/hw/xquartz/xpr/x-hash.h
@@ -72,7 +72,7 @@ X_PFX (cvt_vptr_to_uint) (void * val) __attribute__((always_inline));
72static __inline__ void * 72static __inline__ void *
73X_PFX (cvt_uint_to_vptr) (unsigned int val) 73X_PFX (cvt_uint_to_vptr) (unsigned int val)
74{ 74{
75 return (void*)((size_t)(val)); 75 return (void*)((unsigned long)(val));
76} 76}
77 77
78static __inline__ unsigned int 78static __inline__ unsigned int
diff --git a/hw/xquartz/xpr/xprFrame.c b/hw/xquartz/xpr/xprFrame.c
index 6635f08d8..a3e207616 100644
--- a/hw/xquartz/xpr/xprFrame.c
+++ b/hw/xquartz/xpr/xprFrame.c
@@ -215,10 +215,10 @@ xprDestroyFrame(RootlessFrameID wid)
215static void 215static void
216xprMoveFrame(RootlessFrameID wid, ScreenPtr pScreen, int newX, int newY) 216xprMoveFrame(RootlessFrameID wid, ScreenPtr pScreen, int newX, int newY)
217{ 217{
218 TA_SERVER();
219
220 xp_window_changes wc; 218 xp_window_changes wc;
221 219
220 TA_SERVER();
221
222 wc.x = newX; 222 wc.x = newX;
223 wc.y = newY; 223 wc.y = newY;
224 // ErrorF("xprMoveFrame(%d, %p, %d, %d)\n", wid, pScreen, newX, newY); 224 // ErrorF("xprMoveFrame(%d, %p, %d, %d)\n", wid, pScreen, newX, newY);
@@ -272,7 +272,7 @@ static void xprRestackFrame(RootlessFrameID wid, RootlessFrameID nextWid) {
272 } 272 }
273 273
274 if(window_hash) { 274 if(window_hash) {
275 RootlessWindowRec *winRec = x_hash_table_lookup(window_hash, x_cvt_uint_to_vptr((xp_window_id)wid), NULL); 275 RootlessWindowRec *winRec = x_hash_table_lookup(window_hash, wid, NULL);
276 276
277 if(winRec) { 277 if(winRec) {
278 if(quartzEnableRootless) 278 if(quartzEnableRootless)
@@ -566,8 +566,8 @@ xprHideWindows(Bool hide)
566 TA_SERVER(); 566 TA_SERVER();
567 567
568 for (screen = 0; screen < screenInfo.numScreens; screen++) { 568 for (screen = 0; screen < screenInfo.numScreens; screen++) {
569 pRoot = WindowTable[screenInfo.screens[screen]->myNum];
570 RootlessFrameID prevWid = NULL; 569 RootlessFrameID prevWid = NULL;
570 pRoot = WindowTable[screenInfo.screens[screen]->myNum];
571 571
572 for (pWin = pRoot->firstChild; pWin; pWin = pWin->nextSib) { 572 for (pWin = pRoot->firstChild; pWin; pWin = pWin->nextSib) {
573 RootlessWindowRec *winRec = WINREC(pWin); 573 RootlessWindowRec *winRec = WINREC(pWin);
diff --git a/hw/xquartz/xpr/xprScreen.c b/hw/xquartz/xpr/xprScreen.c
index 3387ecf0a..22a727e67 100644
--- a/hw/xquartz/xpr/xprScreen.c
+++ b/hw/xquartz/xpr/xprScreen.c
@@ -317,11 +317,11 @@ xprAddScreen(int index, ScreenPtr pScreen)
317 317
318 if (noPseudoramiXExtension) 318 if (noPseudoramiXExtension)
319 { 319 {
320 ErrorF("Warning: noPseudoramiXExtension!\n");
321
322 CGDirectDisplayID dpy; 320 CGDirectDisplayID dpy;
323 CGRect frame; 321 CGRect frame;
324 322
323 ErrorF("Warning: noPseudoramiXExtension!\n");
324
325 dpy = displayAtIndex(index); 325 dpy = displayAtIndex(index);
326 326
327 frame = displayScreenBounds(dpy); 327 frame = displayScreenBounds(dpy);