Commit 7e12c9ba authored by Ulrich Sibiller's avatar Ulrich Sibiller

Extension.c: code simplifications

parent 17d5e62b
...@@ -98,13 +98,12 @@ void nxagentInitGlxExtension(VisualPtr *visuals, DepthPtr *depths, ...@@ -98,13 +98,12 @@ void nxagentInitGlxExtension(VisualPtr *visuals, DepthPtr *depths,
int *numVisuals, int *numDepths, int *rootDepth, int *numVisuals, int *numDepths, int *rootDepth,
VisualID *defaultVisual) VisualID *defaultVisual)
{ {
miInitVisualsProcPtr initVisuals;
/* /*
* Initialize the visuals to use the GLX extension. * Initialize the visuals to use the GLX extension.
*/ */
initVisuals = NULL; miInitVisualsProcPtr initVisuals = NULL;
GlxWrapInitVisuals(&initVisuals); GlxWrapInitVisuals(&initVisuals);
...@@ -372,15 +371,13 @@ static int nxagentRandRInitSizes(ScreenPtr pScreen) ...@@ -372,15 +371,13 @@ static int nxagentRandRInitSizes(ScreenPtr pScreen)
int nxagentRandRSetConfig(ScreenPtr pScreen, Rotation rotation, int nxagentRandRSetConfig(ScreenPtr pScreen, Rotation rotation,
int rate, RRScreenSizePtr pSize) int rate, RRScreenSizePtr pSize)
{ {
int r;
UpdateCurrentTime(); UpdateCurrentTime();
/* /*
* Whatever size is OK for us. * Whatever size is OK for us.
*/ */
r = nxagentResizeScreen(pScreen, pSize -> width, pSize -> height, int r = nxagentResizeScreen(pScreen, pSize -> width, pSize -> height,
pSize -> mmWidth, pSize -> mmHeight); pSize -> mmWidth, pSize -> mmHeight);
nxagentMoveViewport(pScreen, 0, 0); nxagentMoveViewport(pScreen, 0, 0);
...@@ -430,8 +427,6 @@ void nxagentRandRSetWindowsSize(int width, int height) ...@@ -430,8 +427,6 @@ void nxagentRandRSetWindowsSize(int width, int height)
int nxagentRandRScreenSetSize(ScreenPtr pScreen, CARD16 width, CARD16 height, int nxagentRandRScreenSetSize(ScreenPtr pScreen, CARD16 width, CARD16 height,
CARD32 mmWidth, CARD32 mmHeight) CARD32 mmWidth, CARD32 mmHeight)
{ {
int result;
UpdateCurrentTime(); UpdateCurrentTime();
if (nxagentOption(DesktopResize) == 1 && if (nxagentOption(DesktopResize) == 1 &&
...@@ -453,7 +448,7 @@ int nxagentRandRScreenSetSize(ScreenPtr pScreen, CARD16 width, CARD16 height, ...@@ -453,7 +448,7 @@ int nxagentRandRScreenSetSize(ScreenPtr pScreen, CARD16 width, CARD16 height,
nxagentChangeOption(Height, height); nxagentChangeOption(Height, height);
} }
result = nxagentResizeScreen(pScreen, width, height, mmWidth, mmHeight); int result = nxagentResizeScreen(pScreen, width, height, mmWidth, mmHeight);
if (result == 1 && nxagentOption(DesktopResize) == 1 && if (result == 1 && nxagentOption(DesktopResize) == 1 &&
nxagentOption(Fullscreen) == 0 && nxagentOption(AllScreens) == 0) nxagentOption(Fullscreen) == 0 && nxagentOption(AllScreens) == 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment