mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 01:34:11 +00:00
treewide: use helper dixGetScreenPtr() for retrieving ScreenPtr's
Instead of directly accessing the global screenInfo.screens[] array, let everybody go through a little inline helper. This one also checks for array bounds - if the screen doesn't exist, return NULL. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
d2fcf85214
commit
0fbb681fce
@@ -29,6 +29,7 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#include "dix/input_priv.h"
|
||||
#include "dix/screenint_priv.h"
|
||||
#include "os/fmt.h"
|
||||
|
||||
#include "misc.h"
|
||||
@@ -66,7 +67,7 @@ dix_version_compare(void)
|
||||
|
||||
static inline void set_screen(unsigned int idx, short x, short y, short w, short h)
|
||||
{
|
||||
ScreenPtr pScreen = screenInfo.screens[idx];
|
||||
ScreenPtr pScreen = dixGetScreenPtr(idx);
|
||||
pScreen->x = x;
|
||||
pScreen->y = y;
|
||||
pScreen->width = w;
|
||||
|
||||
Reference in New Issue
Block a user