summaryrefslogtreecommitdiff
path: root/hw/darwin
diff options
context:
space:
mode:
authorKaleb Keithley <kaleb@freedesktop.org>2003-12-04 22:03:38 +0000
committerKaleb Keithley <kaleb@freedesktop.org>2003-12-04 22:03:38 +0000
commita84f16a9ad2ed0f874d2c1816aedee96725d2657 (patch)
tree26a8489882186f081d8ec88d4d194e531fa30050 /hw/darwin
parent33fdd50a94baab1db342bfce442907db8f8ad03e (diff)
XFree86 4.3.99.901 (RC 1)xf86-4_3_99_901
Diffstat (limited to 'hw/darwin')
-rw-r--r--hw/darwin/bundle/English.lproj/Credits.rtf20
-rw-r--r--hw/darwin/darwin.c6
-rw-r--r--hw/darwin/quartz/XServer.h5
-rw-r--r--hw/darwin/quartz/XServer.m48
-rw-r--r--hw/darwin/quartz/cr/crFrame.m4
-rw-r--r--hw/darwin/quartz/cr/crScreen.m3
-rw-r--r--hw/darwin/quartz/fullscreen/fullscreen.c3
-rw-r--r--hw/darwin/quartz/quartz.c6
-rw-r--r--hw/darwin/quartz/quartz.h4
-rw-r--r--hw/darwin/quartz/xpr/xpr.h3
-rw-r--r--hw/darwin/quartz/xpr/xprFrame.c46
-rw-r--r--hw/darwin/quartz/xpr/xprScreen.c3
12 files changed, 104 insertions, 47 deletions
diff --git a/hw/darwin/bundle/English.lproj/Credits.rtf b/hw/darwin/bundle/English.lproj/Credits.rtf
index 4e2fad42c..7d9a594e6 100644
--- a/hw/darwin/bundle/English.lproj/Credits.rtf
+++ b/hw/darwin/bundle/English.lproj/Credits.rtf
@@ -1,10 +1,26 @@
-{\rtf1\mac\ansicpg10000\cocoartf100
+{\rtf1\mac\ansicpg10000\cocoartf102
{\fonttbl\f0\fswiss\fcharset77 Helvetica-Bold;\f1\fswiss\fcharset77 Helvetica;\f2\fswiss\fcharset77 Helvetica-Oblique;
}
{\colortbl;\red255\green255\blue255;}
+\vieww9000\viewh9000\viewkind0
\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\f0\b\fs24 \cf0 XonX Contributors to XFree86 4.2.99.x:
+\f0\b\fs24 \cf0 Contributors to XFree86 4.4:
+\f1\b0 \
+\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
+\cf0 John Harper\
+
+\f2\i Rootless acceleration and Apple-WM extension
+\f1\i0 \
+Torrey T. Lyons\
+
+\f2\i Project Lead
+\f1\i0 \
+\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
+
+\f0\b \cf0 \
+\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
+\cf0 Additional XonX Contributors to XFree86 4.3:
\f1\b0 \
\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
\cf0 Fabr\'92cio Luis de Castro\
diff --git a/hw/darwin/darwin.c b/hw/darwin/darwin.c
index a7a0d839c..bf0975769 100644
--- a/hw/darwin/darwin.c
+++ b/hw/darwin/darwin.c
@@ -29,7 +29,7 @@
* holders shall not be used in advertising or otherwise to promote the sale,
* use or other dealings in this Software without prior written authorization.
*/
-/* $XFree86: xc/programs/Xserver/hw/darwin/darwin.c,v 1.55 2003/11/15 00:07:09 torrey Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/darwin/darwin.c,v 1.56 2003/11/24 05:39:01 torrey Exp $ */
#include "X.h"
#include "Xproto.h"
@@ -518,9 +518,7 @@ void InitInput( int argc, char **argv )
darwinKeyboard = AddInputDevice(DarwinKeybdProc, TRUE);
RegisterKeyboardDevice( darwinKeyboard );
- if (serverGeneration == 1) {
- DarwinEQInit( (DevicePtr)darwinKeyboard, (DevicePtr)darwinPointer );
- }
+ DarwinEQInit( (DevicePtr)darwinKeyboard, (DevicePtr)darwinPointer );
DarwinModeInitInput(argc, argv);
}
diff --git a/hw/darwin/quartz/XServer.h b/hw/darwin/quartz/XServer.h
index 58c7ff748..01b8ec55e 100644
--- a/hw/darwin/quartz/XServer.h
+++ b/hw/darwin/quartz/XServer.h
@@ -29,7 +29,7 @@
* sale, use or other dealings in this Software without prior written
* authorization.
*/
-/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/XServer.h,v 1.15 2003/11/14 20:27:58 torrey Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/XServer.h,v 1.17 2003/11/24 05:39:01 torrey Exp $ */
#define BOOL xBOOL
#include "Xproto.h"
@@ -46,6 +46,7 @@
BOOL rootlessMenuBarVisible;
BOOL queueShowServer;
BOOL quitWithoutQuery;
+ BOOL pendingAppQuitReply;
UInt32 mouseState;
BOOL sendServerEvents;
BOOL x11Active;
@@ -90,7 +91,7 @@
- (void)sendShowHide:(BOOL)show;
- (void)clientProcessDone:(int)clientStatus;
- (void)activateX11:(BOOL)state;
-- (void)windowBecameKey:(NSWindow *)window;
+- (void)windowBecameKey:(NSNotification *)notification;
- (void)setX11WindowList:(NSArray *)list;
- (void)setX11WindowCheck:(NSNumber *)nn;
diff --git a/hw/darwin/quartz/XServer.m b/hw/darwin/quartz/XServer.m
index 1be22f82c..56e672204 100644
--- a/hw/darwin/quartz/XServer.m
+++ b/hw/darwin/quartz/XServer.m
@@ -34,7 +34,7 @@
* sale, use or other dealings in this Software without prior written
* authorization.
*/
-/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/XServer.m,v 1.17 2003/11/14 20:27:58 torrey Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/XServer.m,v 1.20 2003/11/27 01:59:53 torrey Exp $ */
#include "quartzCommon.h"
@@ -126,6 +126,7 @@ static io_connect_t root_port;
rootlessMenuBarVisible = YES;
queueShowServer = YES;
quartzServerQuitting = NO;
+ pendingAppQuitReply = NO;
mouseState = 0;
// set up a port to safely send messages to main thread from server thread
@@ -141,11 +142,6 @@ static io_connect_t root_port;
[[NSRunLoop currentRunLoop] addPort:signalPort
forMode:NSModalPanelRunLoopMode];
- [[NSNotificationCenter defaultCenter] addObserver:self
- selector:@selector(windowBecameKey:)
- name:NSWindowDidBecomeKeyNotification
- object:nil];
-
return self;
}
@@ -191,6 +187,7 @@ static io_connect_t root_port;
// At this point the X server is either running or starting.
if (serverState == server_Starting) {
// Quit will be queued later when server is running
+ pendingAppQuitReply = YES;
return NSTerminateLater;
} else if (serverState == server_Running) {
[self quitServer];
@@ -490,6 +487,15 @@ static io_connect_t root_port;
if (![self loadDisplayBundle])
[NSApp terminate:nil];
+ // In rootless mode register to receive notification of key window changes
+ if (quartzRootless) {
+ [[NSNotificationCenter defaultCenter]
+ addObserver:self
+ selector:@selector(windowBecameKey:)
+ name:NSWindowDidBecomeKeyNotification
+ object:nil];
+ }
+
// Start the X server thread
serverState = server_Starting;
[NSThread detachNewThreadSelector:@selector(run) toTarget:self
@@ -537,7 +543,7 @@ static io_connect_t root_port;
// Finish starting the X server thread
// This includes anything that must be done after the X server is
-// ready to process events.
+// ready to process events after the first or subsequent generations.
- (void)finishStartX
{
sendServerEvents = YES;
@@ -551,7 +557,8 @@ static io_connect_t root_port;
if (quartzServerQuitting) {
[self quitServer];
- [NSApp replyToApplicationShouldTerminate:YES];
+ if (pendingAppQuitReply)
+ [NSApp replyToApplicationShouldTerminate:YES];
return;
}
@@ -1001,21 +1008,6 @@ static io_connect_t root_port;
// This field should be filled in for every event
xe->u.keyButtonPointer.time = GetTimeInMillis();
-#if 0
- // FIXME: Really?
- if (quartzRootless &&
- (ev->type == NSLeftMouseDown || ev->type == NSLeftMouseUp ||
- (ev->type == NSSystemDefined && ev->data.compound.subType == 7)))
- {
- // mouse button event - send mouseMoved to this position too
- // X gets confused if it gets a click that isn't at the last
- // reported mouse position.
- xEvent moveEvent = *ev;
- xe.u.u.type = NSMouseMoved;
- [self sendXEvent:&moveEvent];
- }
-#endif
-
DarwinEQEnqueue(xe);
}
@@ -1194,8 +1186,10 @@ static io_connect_t root_port;
}
// Some NSWindow became the key window
-- (void)windowBecameKey:(NSWindow *)window
+- (void)windowBecameKey:(NSNotification *)notification
{
+ NSWindow *window = [notification object];
+
if (quartzProcs->IsX11Window(window, [window windowNumber])) {
if (!x11Active)
[self activateX11:YES];
@@ -1322,7 +1316,8 @@ static io_connect_t root_port;
QuartzMessageServerThread(kXDarwinControllerNotify, 1,
AppleWMHideAll);
} else {
- // FIXME: We need to hide Xplugin windows here
+ if (quartzProcs->HideWindows)
+ quartzProcs->HideWindows(YES);
}
}
@@ -1332,7 +1327,8 @@ static io_connect_t root_port;
QuartzMessageServerThread(kXDarwinControllerNotify, 1,
AppleWMShowAll);
} else {
- [NSApp arrangeInFront:nil];
+ if (quartzProcs->HideWindows)
+ quartzProcs->HideWindows(NO);
}
}
diff --git a/hw/darwin/quartz/cr/crFrame.m b/hw/darwin/quartz/cr/crFrame.m
index e3e83ebc4..305d42aa6 100644
--- a/hw/darwin/quartz/cr/crFrame.m
+++ b/hw/darwin/quartz/cr/crFrame.m
@@ -27,7 +27,7 @@
* holders shall not be used in advertising or otherwise to promote the sale,
* use or other dealings in this Software without prior written authorization.
*/
-/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/cr/crFrame.m,v 1.5 2003/11/13 20:26:31 torrey Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/cr/crFrame.m,v 1.7 2003/11/27 01:53:39 torrey Exp $ */
#include "quartzCommon.h"
#include "cr.h"
@@ -163,7 +163,7 @@ CRResizeFrame(RootlessFrameID wid, ScreenPtr pScreen,
{
CRWindowPtr crWinPtr = (CRWindowPtr) wid;
NSRect bounds = NSMakeRect(newX, NSHeight([[NSScreen mainScreen] frame]) -
- newY - newH, newW, newH);
+ newY - newH, newW, newH);
[crWinPtr->window setFrame:bounds display:NO];
}
diff --git a/hw/darwin/quartz/cr/crScreen.m b/hw/darwin/quartz/cr/crScreen.m
index d259d0bac..ab27e8eb8 100644
--- a/hw/darwin/quartz/cr/crScreen.m
+++ b/hw/darwin/quartz/cr/crScreen.m
@@ -27,7 +27,7 @@
* holders shall not be used in advertising or otherwise to promote the sale,
* use or other dealings in this Software without prior written authorization.
*/
-/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/cr/crScreen.m,v 1.5 2003/11/12 20:21:52 torrey Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/cr/crScreen.m,v 1.6 2003/11/27 01:59:53 torrey Exp $ */
#include "quartzCommon.h"
#include "cr.h"
@@ -300,6 +300,7 @@ static QuartzModeProcsRec crModeProcs = {
NULL, // No capture or release in rootless mode
NULL,
CRIsX11Window,
+ NULL, // Cocoa NSWindows hide themselves
RootlessFrameForWindow,
TopLevelParent,
NULL, // No support for DRI surfaces
diff --git a/hw/darwin/quartz/fullscreen/fullscreen.c b/hw/darwin/quartz/fullscreen/fullscreen.c
index fc390e87f..bbea46cab 100644
--- a/hw/darwin/quartz/fullscreen/fullscreen.c
+++ b/hw/darwin/quartz/fullscreen/fullscreen.c
@@ -25,7 +25,7 @@
* holders shall not be used in advertising or otherwise to promote the sale,
* use or other dealings in this Software without prior written authorization.
*/
-/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/fullscreen/fullscreen.c,v 1.2 2003/11/12 20:21:52 torrey Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/fullscreen/fullscreen.c,v 1.3 2003/11/27 01:59:53 torrey Exp $ */
#include "quartzCommon.h"
#include "darwin.h"
@@ -549,6 +549,7 @@ static QuartzModeProcsRec fsModeProcs = {
NULL, // No rootless code in fullscreen
NULL,
NULL,
+ NULL,
NULL, // No support for DRI surfaces
NULL
};
diff --git a/hw/darwin/quartz/quartz.c b/hw/darwin/quartz/quartz.c
index 4643886f3..91ca9fa28 100644
--- a/hw/darwin/quartz/quartz.c
+++ b/hw/darwin/quartz/quartz.c
@@ -29,7 +29,7 @@
* holders shall not be used in advertising or otherwise to promote the sale,
* use or other dealings in this Software without prior written authorization.
*/
-/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartz.c,v 1.13 2003/11/12 20:21:51 torrey Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartz.c,v 1.14 2003/11/24 05:39:02 torrey Exp $ */
#include "quartzCommon.h"
#include "quartz.h"
@@ -156,9 +156,7 @@ void DarwinModeInitInput(
int argc,
char **argv )
{
- if (serverGeneration == 1) {
- QuartzMessageMainThread(kQuartzServerStarted, NULL, 0);
- }
+ QuartzMessageMainThread(kQuartzServerStarted, NULL, 0);
// Do final display mode specific initialization before handling events
if (quartzProcs->InitInput)
diff --git a/hw/darwin/quartz/quartz.h b/hw/darwin/quartz/quartz.h
index 849e10cef..2cec61d66 100644
--- a/hw/darwin/quartz/quartz.h
+++ b/hw/darwin/quartz/quartz.h
@@ -30,7 +30,7 @@
* holders shall not be used in advertising or otherwise to promote the sale,
* use or other dealings in this Software without prior written authorization.
*/
-/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartz.h,v 1.7 2003/11/12 20:21:51 torrey Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartz.h,v 1.8 2003/11/27 01:59:53 torrey Exp $ */
#ifndef _QUARTZ_H
#define _QUARTZ_H
@@ -70,6 +70,7 @@ typedef void (*ReleaseScreensProc)(void);
* Rootless helper functions
*/
typedef Bool (*IsX11WindowProc)(void *nsWindow, int windowNumber);
+typedef void (*HideWindowsProc)(Bool hide);
/*
* Rootless functions for optional export to GLX layer
@@ -103,6 +104,7 @@ typedef struct _QuartzModeProcs {
ReleaseScreensProc ReleaseScreens; // Only called in fullscreen
IsX11WindowProc IsX11Window;
+ HideWindowsProc HideWindows;
FrameForWindowProc FrameForWindow;
TopLevelParentProc TopLevelParent;
diff --git a/hw/darwin/quartz/xpr/xpr.h b/hw/darwin/quartz/xpr/xpr.h
index 3d447b226..b3091f8e1 100644
--- a/hw/darwin/quartz/xpr/xpr.h
+++ b/hw/darwin/quartz/xpr/xpr.h
@@ -26,7 +26,7 @@
* holders shall not be used in advertising or otherwise to promote the sale,
* use or other dealings in this Software without prior written authorization.
*/
-/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/xpr/xpr.h,v 1.4 2003/11/12 20:21:52 torrey Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/xpr/xpr.h,v 1.5 2003/11/27 01:59:53 torrey Exp $ */
#ifndef XPR_H
#define XPR_H
@@ -39,6 +39,7 @@ void AppleDRIExtensionInit(void);
void xprAppleWMInit(void);
Bool xprInit(ScreenPtr pScreen);
Bool xprIsX11Window(void *nsWindow, int windowNumber);
+void xprHideWindows(Bool hide);
Bool QuartzInitCursor(ScreenPtr pScreen);
void QuartzSuspendXCursor(ScreenPtr pScreen);
diff --git a/hw/darwin/quartz/xpr/xprFrame.c b/hw/darwin/quartz/xpr/xprFrame.c
index ae24bc42a..552153852 100644
--- a/hw/darwin/quartz/xpr/xprFrame.c
+++ b/hw/darwin/quartz/xpr/xprFrame.c
@@ -27,10 +27,10 @@
* holders shall not be used in advertising or otherwise to promote the sale,
* use or other dealings in this Software without prior written authorization.
*/
-/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/xpr/xprFrame.c,v 1.4 2003/11/12 20:21:52 torrey Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/xpr/xprFrame.c,v 1.5 2003/11/27 01:59:53 torrey Exp $ */
#include "xpr.h"
-#include "rootless.h"
+#include "rootlessCommon.h"
#include "Xplugin.h"
#include "x-hash.h"
#include "x-list.h"
@@ -437,3 +437,45 @@ xprIsX11Window(void *nsWindow, int windowNumber)
return ret;
}
+
+
+/*
+ * xprHideWindows
+ * Hide or unhide all top level windows. This is called for application hide/
+ * unhide events if the window manager is not Apple-WM aware. Xplugin windows
+ * do not hide or unhide themselves.
+ */
+void
+xprHideWindows(Bool hide)
+{
+ int screen;
+ WindowPtr pRoot, pWin;
+
+ for (screen = 0; screen < screenInfo.numScreens; screen++) {
+ pRoot = WindowTable[screenInfo.screens[screen]->myNum];
+ RootlessFrameID prevWid = NULL;
+
+ for (pWin = pRoot->firstChild; pWin; pWin = pWin->nextSib) {
+ RootlessWindowRec *winRec = WINREC(pWin);
+
+ if (winRec != NULL) {
+ if (hide) {
+ xprUnmapFrame(winRec->wid);
+ } else {
+ BoxRec box;
+
+ xprRestackFrame(winRec->wid, prevWid);
+ prevWid = winRec->wid;
+
+ box.x1 = 0;
+ box.y1 = 0;
+ box.x2 = winRec->width;
+ box.y2 = winRec->height;
+
+ xprDamageRects(winRec->wid, 1, &box, 0, 0);
+ RootlessQueueRedisplay(screenInfo.screens[screen]);
+ }
+ }
+ }
+ }
+}
diff --git a/hw/darwin/quartz/xpr/xprScreen.c b/hw/darwin/quartz/xpr/xprScreen.c
index 8090a27b1..771b7c9f4 100644
--- a/hw/darwin/quartz/xpr/xprScreen.c
+++ b/hw/darwin/quartz/xpr/xprScreen.c
@@ -27,7 +27,7 @@
* holders shall not be used in advertising or otherwise to promote the sale,
* use or other dealings in this Software without prior written authorization.
*/
-/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/xpr/xprScreen.c,v 1.8 2003/11/12 20:21:52 torrey Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/xpr/xprScreen.c,v 1.9 2003/11/27 01:59:53 torrey Exp $ */
#include "quartzCommon.h"
#include "quartz.h"
@@ -358,6 +358,7 @@ static QuartzModeProcsRec xprModeProcs = {
NULL, // No capture or release in rootless mode
NULL,
xprIsX11Window,
+ xprHideWindows,
RootlessFrameForWindow,
TopLevelParent,
DRICreateSurface,