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:43:42 -0700
commitd039c05b1f1473e061abb8461292ae936900f286 (patch)
tree221631f46821a8c4009dbb6be1a5619ae2faf5c5 /miext
parent4915d8885858be3c4a4c27c4700a1cd924364688 (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 271441bff..a8c287800 100644
--- a/miext/rootless/rootlessCommon.h
+++ b/miext/rootless/rootlessCommon.h
@@ -277,7 +277,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);
@@ -285,4 +286,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 5031858dd..2f536edb6 100644
--- a/miext/rootless/rootlessScreen.c
+++ b/miext/rootless/rootlessScreen.c
@@ -471,6 +471,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)
{
@@ -716,3 +744,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 6c254991d..d91db0f1d 100644
--- a/miext/rootless/rootlessWindow.c
+++ b/miext/rootless/rootlessWindow.c
@@ -1589,3 +1589,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);
+ }
+}