Allow rootless implementations to override frame reordering. This is used

on Mac OS X when genie-restoring from the Dock to ensure that the
    animation completes before drawing the frame.
This commit is contained in:
Torrey Lyons 2004-10-08 00:35:08 +00:00
commit fa9847aeb9
8 changed files with 128 additions and 41 deletions

View file

@ -266,6 +266,20 @@ typedef void (*RootlessDamageRectsProc)
typedef void (*RootlessSwitchWindowProc)
(RootlessWindowPtr pFrame, WindowPtr oldWin);
/*
* Check if window should be reordered. (Optional)
* The underlying window system may animate windows being ordered in.
* We want them to be mapped but remain ordered out until the animation
* completes. If defined this function will be called to check if a
* framed window should be reordered now. If this function returns
* FALSE, the window will still be mapped from the X11 perspective, but
* the RestackFrame function will not be called for its frame.
*
* pFrame Frame to reorder
*/
typedef Bool (*RootlessDoReorderWindowProc)
(RootlessWindowPtr pFrame);
/*
* Copy bytes. (Optional)
* Source and destinate may overlap and the right thing should happen.
@ -354,6 +368,7 @@ typedef struct _RootlessFrameProcs {
/* Optional frame functions */
RootlessSwitchWindowProc SwitchWindow;
RootlessDoReorderWindowProc DoReorderWindow;
/* Optional acceleration functions */
RootlessCopyBytesProc CopyBytes;

View file

@ -1,4 +1,4 @@
/* $XdotOrg: xc/programs/Xserver/miext/rootless/rootlessWindow.c,v 1.2 2004/04/23 19:54:27 eich Exp $ */
/* $XdotOrg: xc/programs/Xserver/miext/rootless/rootlessWindow.c,v 1.3 2004/07/30 19:12:17 torrey Exp $ */
/*
* Rootless window management
*/
@ -481,7 +481,7 @@ RootlessUnrealizeWindow(WindowPtr pWin)
/*
* RootlessReorderWindow
* Reorder the window associated with the given frame so that it's
* Reorder the frame associated with the given window so that it's
* physically above the window below it in the X stacking order.
*/
void
@ -495,6 +495,15 @@ RootlessReorderWindow(WindowPtr pWin)
RootlessFrameID newPrevID;
ScreenPtr pScreen = pWin->drawable.pScreen;
/* Check if the implementation wants the frame to not be reordered
even though the X11 window is restacked. This can be useful if
frames are ordered-in with animation so that the reordering is not
done until the animation is complete. */
if (SCREENREC(pScreen)->imp->DoReorderWindow) {
if (!SCREENREC(pScreen)->imp->DoReorderWindow(winRec))
return;
}
RootlessStopDrawing(pWin, FALSE);
/* Find the next window above this one that has a mapped frame. */