summaryrefslogtreecommitdiff
path: root/miext
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@freedesktop.org>2008-10-08 18:39:41 -0700
committerJeremy Huddleston <jeremyhu@freedesktop.org>2008-10-08 18:45:17 -0700
commitd13c3cbd43bc5e6b459c7df822292cf02ad2c9c4 (patch)
tree1f22a573636952a3920f6bfa550943b7811efd9c /miext
parentdc166bf6423f4243ea05f17340ff9ff99ecad74b (diff)
XQuartz: Some motion made towards supporting fullscreen.
(cherry picked from commit 99be3d68b64059caada739a373e5e01844c776e0)
Diffstat (limited to 'miext')
-rw-r--r--miext/rootless/rootlessCommon.h12
-rw-r--r--miext/rootless/rootlessScreen.c43
-rw-r--r--miext/rootless/rootlessWindow.c102
3 files changed, 156 insertions, 1 deletions
diff --git a/miext/rootless/rootlessCommon.h b/miext/rootless/rootlessCommon.h
index 3d338910f..034d563c6 100644
--- a/miext/rootless/rootlessCommon.h
+++ b/miext/rootless/rootlessCommon.h
@@ -273,7 +273,8 @@ Bool RootlessResolveColormap (ScreenPtr pScreen, int first_color,
void RootlessFlushWindowColormap (WindowPtr pWin);
void RootlessFlushScreenColormaps (ScreenPtr pScreen);
-RootlessColormapCallback(void *data, int first_color, int n_colors, uint32_t *colors);
+// xp_error
+int RootlessColormapCallback(void *data, int first_color, int n_colors, uint32_t *colors);
// Move a window to its proper location on the screen.
void RootlessRepositionWindow(WindowPtr pWin);
@@ -281,4 +282,13 @@ void RootlessRepositionWindow(WindowPtr pWin);
// Move the window to it's correct place in the physical stacking order.
void RootlessReorderWindow(WindowPtr pWin);
+void RootlessScreenExpose (ScreenPtr pScreen);
+void RootlessHideAllWindows (void);
+void RootlessShowAllWindows (void);
+void RootlessUpdateRooted (Bool state);
+
+void RootlessEnableRoot (ScreenPtr pScreen);
+void RootlessDisableRoot (ScreenPtr pScreen);
+
+
#endif /* _ROOTLESSCOMMON_H */
diff --git a/miext/rootless/rootlessScreen.c b/miext/rootless/rootlessScreen.c
index 421c03c00..0db51d55a 100644
--- a/miext/rootless/rootlessScreen.c
+++ b/miext/rootless/rootlessScreen.c
@@ -475,6 +475,34 @@ RootlessMarkOverlappedWindows(WindowPtr pWin, WindowPtr pFirst,
return result;
}
+expose_1 (WindowPtr pWin)
+{
+ WindowPtr pChild;
+
+ if (!pWin->realized)
+ return;
+
+ (*pWin->drawable.pScreen->PaintWindowBackground) (pWin, &pWin->borderClip,
+ PW_BACKGROUND);
+
+ /* FIXME: comments in windowstr.h indicate that borderClip doesn't
+ include subwindow visibility. But I'm not so sure.. so we may
+ be exposing too much.. */
+
+ miSendExposures (pWin, &pWin->borderClip,
+ pWin->drawable.x, pWin->drawable.y);
+
+ for (pChild = pWin->firstChild; pChild != NULL; pChild = pChild->nextSib)
+ expose_1 (pChild);
+}
+
+void
+RootlessScreenExpose (ScreenPtr pScreen)
+{
+ expose_1 (WindowTable[pScreen->myNum]);
+}
+
+
ColormapPtr
RootlessGetColormap (ScreenPtr pScreen)
{
@@ -718,3 +746,18 @@ Bool RootlessInit(ScreenPtr pScreen, RootlessFrameProcsPtr procs)
return TRUE;
}
+
+void RootlessUpdateRooted (Bool state) {
+ int i;
+
+ if (!state)
+ {
+ for (i = 0; i < screenInfo.numScreens; i++)
+ RootlessDisableRoot (screenInfo.screens[i]);
+ }
+ else
+ {
+ for (i = 0; i < screenInfo.numScreens; i++)
+ RootlessEnableRoot (screenInfo.screens[i]);
+ }
+}
diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c
index c0554f4de..5ef139101 100644
--- a/miext/rootless/rootlessWindow.c
+++ b/miext/rootless/rootlessWindow.c
@@ -1581,3 +1581,105 @@ RootlessOrderAllWindows (void)
}
RL_DEBUG_MSG("RootlessOrderAllWindows() done");
}
+
+void
+RootlessEnableRoot (ScreenPtr pScreen)
+{
+ WindowPtr pRoot;
+ pRoot = WindowTable[pScreen->myNum];
+
+ RootlessEnsureFrame (pRoot);
+ (*pScreen->ClearToBackground) (pRoot, 0, 0, 0, 0, TRUE);
+ RootlessReorderWindow (pRoot);
+}
+
+void
+RootlessDisableRoot (ScreenPtr pScreen)
+{
+ WindowPtr pRoot;
+ RootlessWindowRec *winRec;
+
+ pRoot = WindowTable[pScreen->myNum];
+ winRec = WINREC (pRoot);
+
+ if (winRec != NULL)
+ {
+ RootlessDestroyFrame (pRoot, winRec);
+ DeleteProperty (pRoot, xa_native_window_id ());
+ }
+}
+
+void
+RootlessHideAllWindows (void)
+{
+ int i;
+ ScreenPtr pScreen;
+ WindowPtr pWin;
+ RootlessWindowRec *winRec;
+ xp_window_changes wc;
+
+ if (windows_hidden)
+ return;
+
+ windows_hidden = TRUE;
+
+ for (i = 0; i < screenInfo.numScreens; i++)
+ {
+ pScreen = screenInfo.screens[i];
+ pWin = WindowTable[i];
+ if (pScreen == NULL || pWin == NULL)
+ continue;
+
+ for (pWin = pWin->firstChild; pWin != NULL; pWin = pWin->nextSib)
+ {
+ if (!pWin->realized)
+ continue;
+
+ RootlessStopDrawing (pWin, FALSE);
+
+ winRec = WINREC (pWin);
+ if (winRec != NULL)
+ {
+ wc.stack_mode = XP_UNMAPPED;
+ wc.sibling = 0;
+ configure_window ((xp_window_id)winRec->wid, XP_STACKING, &wc);
+ }
+ }
+ }
+}
+
+void
+RootlessShowAllWindows (void)
+{
+ int i;
+ ScreenPtr pScreen;
+ WindowPtr pWin;
+ RootlessWindowRec *winRec;
+
+ if (!windows_hidden)
+ return;
+
+ windows_hidden = FALSE;
+
+ for (i = 0; i < screenInfo.numScreens; i++)
+ {
+ pScreen = screenInfo.screens[i];
+ pWin = WindowTable[i];
+ if (pScreen == NULL || pWin == NULL)
+ continue;
+
+ for (pWin = pWin->firstChild; pWin != NULL; pWin = pWin->nextSib)
+ {
+ if (!pWin->realized)
+ continue;
+
+ winRec = RootlessEnsureFrame (pWin);
+ if (winRec == NULL)
+ continue;
+
+ RootlessReorderWindow (pWin);
+ }
+
+ RootlessScreenExpose (pScreen);
+ }
+}