summaryrefslogtreecommitdiff
path: root/hw/darwin/quartz/xpr
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/quartz/xpr
parent33fdd50a94baab1db342bfce442907db8f8ad03e (diff)
XFree86 4.3.99.901 (RC 1)xf86-4_3_99_901
Diffstat (limited to 'hw/darwin/quartz/xpr')
-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
3 files changed, 48 insertions, 4 deletions
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,