mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
treewide: use inline helper for accessing first screen
Instead of everybody directly accessing the (internal) screenInfo struct, let those consumers only interested in first screen use a little helper. Also caching the value if it's needed several times. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
d0a155c824
commit
6bc438ab5a
@@ -49,6 +49,7 @@
|
||||
#include "dix/input_priv.h"
|
||||
#include "dix/rpcbuf_priv.h"
|
||||
#include "dix/screen_hooks_priv.h"
|
||||
#include "dix/screenint_priv.h"
|
||||
|
||||
#include "xfixesint.h"
|
||||
#include "scrnintstr.h"
|
||||
@@ -618,7 +619,7 @@ ReplaceCursor(CursorPtr pCursor, TestCursorFunc testCursor, void *closure)
|
||||
}
|
||||
}
|
||||
/* this "knows" that WindowHasNewCursor doesn't depend on its argument */
|
||||
WindowHasNewCursor(screenInfo.screens[0]->root);
|
||||
WindowHasNewCursor(dixGetFirstScreenPtr()->root);
|
||||
}
|
||||
|
||||
static Bool
|
||||
|
||||
Reference in New Issue
Block a user