mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 05:54:08 +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
@@ -74,6 +74,7 @@
|
||||
|
||||
#include "dix/dix_priv.h"
|
||||
#include "dix/request_priv.h"
|
||||
#include "dix/screenint_priv.h"
|
||||
#include "include/extinit.h"
|
||||
#include "randr/randrstr_priv.h"
|
||||
|
||||
@@ -313,7 +314,7 @@ RRXineramaExtensionInit(void)
|
||||
* with their own output geometry. So if there's more than one protocol
|
||||
* screen, just don't even try.
|
||||
*/
|
||||
if (screenInfo.numScreens > 1)
|
||||
if (dixGetScreenPtr(1))
|
||||
return;
|
||||
|
||||
(void) AddExtension(PANORAMIX_PROTOCOL_NAME, 0, 0,
|
||||
|
||||
Reference in New Issue
Block a user