summaryrefslogtreecommitdiff
path: root/hw/darwin/quartz
diff options
context:
space:
mode:
Diffstat (limited to 'hw/darwin/quartz')
-rw-r--r--hw/darwin/quartz/XDarwinStartup.man1
-rw-r--r--hw/darwin/quartz/applewm.c2
-rw-r--r--hw/darwin/quartz/fullscreen/quartzCursor.h3
-rw-r--r--hw/darwin/quartz/keysym2ucs.c3
-rw-r--r--hw/darwin/quartz/quartz.c23
-rw-r--r--hw/darwin/quartz/quartz.h3
-rw-r--r--hw/darwin/quartz/quartzCocoa.m8
-rw-r--r--hw/darwin/quartz/quartzCursor.h3
-rw-r--r--hw/darwin/quartz/quartzKeyboard.c62
-rw-r--r--hw/darwin/quartz/xpr/dri.c2
-rw-r--r--hw/darwin/quartz/xpr/xprScreen.c8
11 files changed, 67 insertions, 51 deletions
diff --git a/hw/darwin/quartz/XDarwinStartup.man b/hw/darwin/quartz/XDarwinStartup.man
index 9bf7dfabd..1ad3bbced 100644
--- a/hw/darwin/quartz/XDarwinStartup.man
+++ b/hw/darwin/quartz/XDarwinStartup.man
@@ -1,4 +1,3 @@
-.\" $XFree86: xc/programs/Xserver/hw/darwin/bundle/XDarwinStartup.man,v 1.1 2002/02/05 19:16:14 torrey Exp $
.TH XDarwinStartup 1
.SH NAME
XDarwinStartup - Startup program for the XDarwin X window server
diff --git a/hw/darwin/quartz/applewm.c b/hw/darwin/quartz/applewm.c
index d3c26ed28..308c51074 100644
--- a/hw/darwin/quartz/applewm.c
+++ b/hw/darwin/quartz/applewm.c
@@ -1,6 +1,6 @@
/**************************************************************************
-Copyright (c) 2002 Apple Computer, Inc. All Rights Reserved.
+Copyright (c) 2002-2007 Apple Inc. All Rights Reserved.
Copyright (c) 2003 Torrey T. Lyons. All Rights Reserved.
Permission is hereby granted, free of charge, to any person obtaining a
diff --git a/hw/darwin/quartz/fullscreen/quartzCursor.h b/hw/darwin/quartz/fullscreen/quartzCursor.h
index 57fac68a5..56a02098d 100644
--- a/hw/darwin/quartz/fullscreen/quartzCursor.h
+++ b/hw/darwin/quartz/fullscreen/quartzCursor.h
@@ -2,8 +2,7 @@
* quartzCursor.h
*
* External interface for Quartz hardware cursor
- */
-/*
+ *
* Copyright (c) 2001 Torrey T. Lyons and Greg Parker.
* All Rights Reserved.
*
diff --git a/hw/darwin/quartz/keysym2ucs.c b/hw/darwin/quartz/keysym2ucs.c
index 3be59df33..8626ebc4e 100644
--- a/hw/darwin/quartz/keysym2ucs.c
+++ b/hw/darwin/quartz/keysym2ucs.c
@@ -1,4 +1,5 @@
-/*
+/*
+ *
* This module converts keysym values into the corresponding ISO 10646
* (UCS, Unicode) values.
*
diff --git a/hw/darwin/quartz/quartz.c b/hw/darwin/quartz/quartz.c
index 374f365f2..25061a8b3 100644
--- a/hw/darwin/quartz/quartz.c
+++ b/hw/darwin/quartz/quartz.c
@@ -1,9 +1,7 @@
-/**************************************************************
+/*
*
* Quartz-specific support for the Darwin X Server
*
- **************************************************************/
-/*
* Copyright (c) 2001-2004 Greg Parker and Torrey T. Lyons.
* All Rights Reserved.
*
@@ -64,7 +62,7 @@ int quartzServerVisible = TRUE;
int quartzServerQuitting = FALSE;
int quartzScreenIndex = 0;
int aquaMenuBarHeight = 0;
-int noPseudoramiXExtension = TRUE;
+int noPseudoramiXExtension = FALSE;
QuartzModeProcsPtr quartzProcs = NULL;
const char *quartzOpenGLBundle = NULL;
@@ -397,11 +395,22 @@ void DarwinModeProcessEvent(
QuartzUpdateScreens();
break;
- case kXDarwinWindowState:
- case kXDarwinWindowMoved:
- // FIXME: Not implemented yet
+ case kXDarwinBringAllToFront:
+ RootlessOrderAllWindows();
break;
+ case kXDarwinWindowState:
+ ErrorF("kXDarwinWindowState\n");
+ break;
+ case kXDarwinWindowMoved: {
+ WindowPtr pWin = (WindowPtr)xe->u.clientMessage.u.l.longs0;
+ short x = xe->u.clientMessage.u.l.longs1,
+ y = xe->u.clientMessage.u.l.longs2;
+ ErrorF("kXDarwinWindowMoved(%p, %hd, %hd)\n", pWin, x, y);
+ RootlessMoveWindow(pWin, x, y, pWin->nextSib, VTMove);
+ }
+ break;
+
default:
ErrorF("Unknown application defined event type %d.\n",
xe->u.u.type);
diff --git a/hw/darwin/quartz/quartz.h b/hw/darwin/quartz/quartz.h
index f1b36b6b1..fa7499df1 100644
--- a/hw/darwin/quartz/quartz.h
+++ b/hw/darwin/quartz/quartz.h
@@ -3,8 +3,7 @@
*
* External interface of the Quartz display modes seen by the generic, mode
* independent parts of the Darwin X server.
- */
-/*
+ *
* Copyright (c) 2001-2003 Greg Parker and Torrey T. Lyons.
* All Rights Reserved.
*
diff --git a/hw/darwin/quartz/quartzCocoa.m b/hw/darwin/quartz/quartzCocoa.m
index 33c50a1c6..3987cd2c2 100644
--- a/hw/darwin/quartz/quartzCocoa.m
+++ b/hw/darwin/quartz/quartzCocoa.m
@@ -42,14 +42,16 @@
#include <Cocoa/Cocoa.h>
+#ifndef INXQUARTZ
#import "Preferences.h"
+#endif
#include "pseudoramiX.h"
extern void FatalError(const char *, ...);
extern char *display;
extern int noPanoramiXExtension;
-
+#ifndef INXQUARTZ
/*
* QuartzReadPreferences
* Read the user preferences from the Cocoa front end.
@@ -95,7 +97,7 @@ void QuartzReadPreferences(void)
darwinDesiredDepth = [Preferences depth] - 1;
}
-
+#endif
/*
* QuartzWriteCocoaPasteboard
@@ -160,6 +162,7 @@ char *QuartzReadCocoaPasteboard(void)
int QuartzFSUseQDCursor(
int depth) // screen depth
{
+#ifndef INXQUARTZ
switch ([Preferences useQDCursor]) {
case qdCursor_Always:
return TRUE;
@@ -171,6 +174,7 @@ int QuartzFSUseQDCursor(
else
return FALSE;
}
+#endif
return TRUE;
}
diff --git a/hw/darwin/quartz/quartzCursor.h b/hw/darwin/quartz/quartzCursor.h
index 57fac68a5..56a02098d 100644
--- a/hw/darwin/quartz/quartzCursor.h
+++ b/hw/darwin/quartz/quartzCursor.h
@@ -2,8 +2,7 @@
* quartzCursor.h
*
* External interface for Quartz hardware cursor
- */
-/*
+ *
* Copyright (c) 2001 Torrey T. Lyons and Greg Parker.
* All Rights Reserved.
*
diff --git a/hw/darwin/quartz/quartzKeyboard.c b/hw/darwin/quartz/quartzKeyboard.c
index f81ef0abc..b580a8e84 100644
--- a/hw/darwin/quartz/quartzKeyboard.c
+++ b/hw/darwin/quartz/quartzKeyboard.c
@@ -217,42 +217,41 @@ DarwinModeReadSystemKeymap (darwinKeyboardInfo *info)
const void *chr_data = NULL;
int num_keycodes = NUM_KEYCODES;
UInt32 keyboard_type = 0;
- int is_uchr, i, j;
+ int is_uchr = 1, i, j;
OSStatus err;
KeySym *k;
TISInputSourceRef currentKeyLayoutRef = TISCopyCurrentKeyboardLayoutInputSource();
- if (currentKeyLayoutRef)
- {
- CFDataRef currentKeyLayoutDataRef = (CFDataRef )TISGetInputSourceProperty(currentKeyLayoutRef, kTISPropertyUnicodeKeyLayoutData);
- if (currentKeyLayoutDataRef)
- chr_data = CFDataGetBytePtr(currentKeyLayoutDataRef);
- }
-
- if (chr_data != NULL)
- {
- KLGetCurrentKeyboardLayout (&key_layout);
- KLGetKeyboardLayoutProperty (key_layout, kKLuchrData, &chr_data);
-
- if (chr_data != NULL)
+ if (currentKeyLayoutRef)
{
- is_uchr = 1;
- keyboard_type = LMGetKbdType ();
+ CFDataRef currentKeyLayoutDataRef = (CFDataRef )TISGetInputSourceProperty(currentKeyLayoutRef, kTISPropertyUnicodeKeyLayoutData);
+ if (currentKeyLayoutDataRef)
+ chr_data = CFDataGetBytePtr(currentKeyLayoutDataRef);
+ }
+
+ if(chr_data == NULL) {
+ KLGetCurrentKeyboardLayout (&key_layout);
+ KLGetKeyboardLayoutProperty (key_layout, kKLuchrData, &chr_data);
+
+ if (chr_data != NULL)
+ {
+ is_uchr = 1;
+ keyboard_type = LMGetKbdType ();
+ }
+ else
+ {
+ KLGetKeyboardLayoutProperty (key_layout, kKLKCHRData, &chr_data);
+
+ if (chr_data == NULL)
+ {
+ ErrorF ( "Couldn't get uchr or kchr resource\n");
+ return FALSE;
+ }
+
+ is_uchr = 0;
+ num_keycodes = 128;
+ }
}
- else
- {
- KLGetKeyboardLayoutProperty (key_layout, kKLKCHRData, &chr_data);
-
- if (chr_data == NULL)
- {
- ErrorF ( "Couldn't get uchr or kchr resource\n");
- return FALSE;
- }
-
- is_uchr = 0;
- num_keycodes = 128;
- }
- }
/* Scan the keycode range for the Unicode character that each
key produces in the four shift states. Then convert that to
@@ -376,8 +375,7 @@ DarwinModeReadSystemKeymap (darwinKeyboardInfo *info)
}
}
}
-
- if(currentKeyLayoutRef) CFRelease(currentKeyLayoutRef);
+ if(currentKeyLayoutRef) CFRelease(currentKeyLayoutRef);
return TRUE;
}
diff --git a/hw/darwin/quartz/xpr/dri.c b/hw/darwin/quartz/xpr/dri.c
index acc1f45f7..fd0bff1a9 100644
--- a/hw/darwin/quartz/xpr/dri.c
+++ b/hw/darwin/quartz/xpr/dri.c
@@ -236,7 +236,7 @@ DRIFinishScreenInit(ScreenPtr pScreen)
pDRIPriv->wrap.ClipNotify = pScreen->ClipNotify;
pScreen->ClipNotify = DRIClipNotify;
- ErrorF("[DRI] screen %d installation complete\n", pScreen->myNum);
+ // ErrorF("[DRI] screen %d installation complete\n", pScreen->myNum);
return TRUE;
}
diff --git a/hw/darwin/quartz/xpr/xprScreen.c b/hw/darwin/quartz/xpr/xprScreen.c
index 3f91980bd..709e6e8cc 100644
--- a/hw/darwin/quartz/xpr/xprScreen.c
+++ b/hw/darwin/quartz/xpr/xprScreen.c
@@ -45,6 +45,10 @@
# include "damage.h"
#endif
+/* 10.4's deferred update makes X slower.. have to live with the tearing
+ for now.. */
+#define XP_NO_DEFERRED_UPDATES 8
+
// Name of GLX bundle for native OpenGL
static const char *xprOpenGLBundle = "glxCGL.bundle";
@@ -59,10 +63,12 @@ eventHandler(unsigned int type, const void *arg,
switch (type)
{
case XP_EVENT_DISPLAY_CHANGED:
+ // ErrorF("XP_EVENT_DISPLAY_MOVED\n");
QuartzMessageServerThread(kXDarwinDisplayChanged, 0);
break;
case XP_EVENT_WINDOW_STATE_CHANGED:
+ // ErrorF("XP_EVENT_WINDOW_STATE_CHANGED\n");
if (arg_size >= sizeof(xp_window_state_event))
{
const xp_window_state_event *ws_arg = arg;
@@ -73,6 +79,7 @@ eventHandler(unsigned int type, const void *arg,
break;
case XP_EVENT_WINDOW_MOVED:
+ // ErrorF("XP_EVENT_WINDOW_MOVED\n");
if (arg_size == sizeof(xp_window_id))
{
xp_window_id id = * (xp_window_id *) arg;
@@ -89,6 +96,7 @@ eventHandler(unsigned int type, const void *arg,
case XP_EVENT_SURFACE_DESTROYED:
case XP_EVENT_SURFACE_CHANGED:
+ // ErrorF("XP_EVENT_SURFACE_MOVED\n");
if (arg_size == sizeof(xp_surface_id))
{
int kind;