summaryrefslogtreecommitdiff
path: root/dix/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'dix/window.c')
-rw-r--r--dix/window.c120
1 files changed, 45 insertions, 75 deletions
diff --git a/dix/window.c b/dix/window.c
index 2a82f2e0a..7d99477ce 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -539,7 +539,7 @@ InitRootWindow(WindowPtr pWin)
* window from which the region came.
*/
-void
+static void
ClippedRegionFromBox(WindowPtr pWin, RegionPtr Rgn,
int x, int y,
int w, int h)
@@ -836,6 +836,26 @@ CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w,
}
static void
+DisposeWindowOptional (WindowPtr pWin)
+{
+ if (!pWin->optional)
+ return;
+ /*
+ * everything is peachy. Delete the optional record
+ * and clean up
+ */
+ if (pWin->optional->cursor)
+ {
+ FreeCursor (pWin->optional->cursor, (Cursor)0);
+ pWin->cursorIsNone = FALSE;
+ }
+ else
+ pWin->cursorIsNone = TRUE;
+ xfree (pWin->optional);
+ pWin->optional = NULL;
+}
+
+static void
FreeWindowResources(WindowPtr pWin)
{
ScreenPtr pScreen = pWin->drawable.pScreen;
@@ -2703,6 +2723,30 @@ RealizeTree(WindowPtr pWin)
}
}
+static WindowPtr windowDisableMapUnmapEvents;
+
+void
+DisableMapUnmapEvents(WindowPtr pWin)
+{
+ assert (windowDisableMapUnmapEvents == NULL);
+
+ windowDisableMapUnmapEvents = pWin;
+}
+
+void
+EnableMapUnmapEvents(WindowPtr pWin)
+{
+ assert (windowDisableMapUnmapEvents != NULL);
+
+ windowDisableMapUnmapEvents = NULL;
+}
+
+static Bool
+MapUnmapEventsEnabled(WindowPtr pWin)
+{
+ return pWin != windowDisableMapUnmapEvents;
+}
+
/*****
* MapWindow
* If some other client has selected SubStructureReDirect on the parent
@@ -3203,21 +3247,6 @@ HandleSaveSet(ClientPtr client)
/**
*
- * \param x,y in root
- * \param box "return" value
- */
-Bool
-VisibleBoundingBoxFromPoint(WindowPtr pWin, int x, int y, BoxPtr box)
-{
- if (!pWin->realized)
- return (FALSE);
- if (POINT_IN_REGION(pWin->drawable.pScreen, &pWin->clipList, x, y, box))
- return(TRUE);
- return(FALSE);
-}
-
-/**
- *
* \param x,y in root
*/
Bool
@@ -3324,30 +3353,6 @@ SendVisibilityNotify(WindowPtr pWin)
DeliverEvents(pWin, &event, 1, NullWindow);
}
-static WindowPtr windowDisableMapUnmapEvents;
-
-void
-DisableMapUnmapEvents(WindowPtr pWin)
-{
- assert (windowDisableMapUnmapEvents == NULL);
-
- windowDisableMapUnmapEvents = pWin;
-}
-
-void
-EnableMapUnmapEvents(WindowPtr pWin)
-{
- assert (windowDisableMapUnmapEvents != NULL);
-
- windowDisableMapUnmapEvents = NULL;
-}
-
-Bool
-MapUnmapEventsEnabled(WindowPtr pWin)
-{
- return pWin != windowDisableMapUnmapEvents;
-}
-
#define RANDOM_WIDTH 32
#ifndef NOLOGOHACK
@@ -3700,41 +3705,6 @@ MakeWindowOptional (WindowPtr pWin)
return TRUE;
}
-void
-DisposeWindowOptional (WindowPtr pWin)
-{
- if (!pWin->optional)
- return;
- /*
- * everything is peachy. Delete the optional record
- * and clean up
- */
- /*
- * TOG changed this code to:
- *
- * if (pWin->cursorIsNone == FALSE)
- * FreeCursor (pWin->optional->cursor, (Cursor)0);
- * pWin->cursorIsNone = TRUE;
- *
- * This is blatently wrong; windows without optionals can have
- * two different cursor values, either None or sharing their
- * parents cursor. This difference is controlled by the
- * cursorIsNone value; when TRUE, the window has no cursor,
- * when false, it shares its cursor with its parent; TOG
- * made it impossible for a window to have a cursor without
- * an optional record.
- */
- if (pWin->optional->cursor)
- {
- FreeCursor (pWin->optional->cursor, (Cursor)0);
- pWin->cursorIsNone = FALSE;
- }
- else
- pWin->cursorIsNone = TRUE;
- xfree (pWin->optional);
- pWin->optional = NULL;
-}
-
#ifndef NOLOGOHACK
static void
DrawLogo(WindowPtr pWin)