mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-27 21:22:26 +00:00
Move each screen's screensaver data into ScreenRec.
Most references to the savedScreenInfo array already had the corresponding screen pointer handy, which meant they usually looked like "savedScreenInfo[pScreen->myNum]". Adding a field to ScreenRec instead of keeping this information in a parallel array simplifies those expressions, and eliminates a MAXSCREENS-sized array. Since dix uses this data, a screen private entry isn't appropriate. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (i686 GNU/Linux)
This commit is contained in:
parent
5030540d6c
commit
80b5d3a326
8 changed files with 64 additions and 64 deletions
|
|
@ -82,6 +82,16 @@ typedef struct _Depth {
|
|||
VisualID *vids; /* block of visual ids for this depth */
|
||||
} DepthRec;
|
||||
|
||||
typedef struct _ScreenSaverStuff {
|
||||
WindowPtr pWindow;
|
||||
XID wid;
|
||||
char blanked;
|
||||
Bool (*ExternalScreenSaver)(
|
||||
ScreenPtr /*pScreen*/,
|
||||
int /*xstate*/,
|
||||
Bool /*force*/);
|
||||
} ScreenSaverStuffRec;
|
||||
|
||||
|
||||
/*
|
||||
* There is a typedef for each screen function pointer so that code that
|
||||
|
|
@ -468,6 +478,7 @@ typedef struct _Screen {
|
|||
pointer devPrivate;
|
||||
short numVisuals;
|
||||
VisualPtr visuals;
|
||||
ScreenSaverStuffRec screensaver;
|
||||
|
||||
/* Random screen procedures */
|
||||
|
||||
|
|
|
|||
|
|
@ -204,24 +204,15 @@ extern _X_EXPORT Mask DontPropagateMasks[];
|
|||
|
||||
#define HasBorder(w) ((w)->borderWidth || wClipShape(w))
|
||||
|
||||
typedef struct _ScreenSaverStuff {
|
||||
WindowPtr pWindow;
|
||||
XID wid;
|
||||
char blanked;
|
||||
Bool (*ExternalScreenSaver)(
|
||||
ScreenPtr /*pScreen*/,
|
||||
int /*xstate*/,
|
||||
Bool /*force*/);
|
||||
} ScreenSaverStuffRec, *ScreenSaverStuffPtr;
|
||||
typedef struct _ScreenSaverStuff *ScreenSaverStuffPtr;
|
||||
|
||||
#define SCREEN_IS_BLANKED 0
|
||||
#define SCREEN_ISNT_SAVED 1
|
||||
#define SCREEN_IS_TILED 2
|
||||
#define SCREEN_IS_BLACK 3
|
||||
|
||||
#define HasSaverWindow(i) (savedScreenInfo[i].pWindow != NullWindow)
|
||||
#define HasSaverWindow(pScreen) (pScreen->screensaver.pWindow != NullWindow)
|
||||
|
||||
extern _X_EXPORT int screenIsSaved;
|
||||
extern _X_EXPORT ScreenSaverStuffRec savedScreenInfo[MAXSCREENS];
|
||||
|
||||
#endif /* WINDOWSTRUCT_H */
|
||||
|
|
|
|||
Loading…
Reference in a new issue