mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 03:44:06 +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
@@ -828,7 +828,7 @@ PanoramiXConsolidate(void)
|
||||
VisualID
|
||||
PanoramiXTranslateVisualID(int screen, VisualID orig)
|
||||
{
|
||||
ScreenPtr pOtherScreen = screenInfo.screens[screen];
|
||||
ScreenPtr pOtherScreen = dixGetScreenPtr(screen);
|
||||
VisualPtr pVisual = NULL;
|
||||
int i;
|
||||
|
||||
@@ -971,7 +971,7 @@ ProcPanoramiXGetScreenSize(ClientPtr client)
|
||||
if (rc != Success)
|
||||
return rc;
|
||||
|
||||
ScreenPtr pScreen = screenInfo.screens[stuff->screen];
|
||||
ScreenPtr pScreen = dixGetScreenPtr(stuff->screen);
|
||||
|
||||
xPanoramiXGetScreenSizeReply reply = {
|
||||
/* screen dimensions */
|
||||
|
||||
Reference in New Issue
Block a user