From 16cd2bbe1c4425e3fa557f9ca0723aa94a50b071 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Fri, 8 Feb 2019 00:44:48 +0100 Subject: nxagent: rework Bool handling drop "== False", "== 0", "== True" and "== 0" for nxagentOptions and Traps --- nx-X11/programs/Xserver/hw/nxagent/Extensions.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent/Extensions.c') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Extensions.c b/nx-X11/programs/Xserver/hw/nxagent/Extensions.c index 785724cea..168191028 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Extensions.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Extensions.c @@ -396,7 +396,7 @@ void nxagentRandRSetWindowsSize(int width, int height) { if (width == 0) { - if (nxagentOption(Fullscreen) == 1) + if (nxagentOption(Fullscreen)) { width = WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay)); } @@ -408,7 +408,7 @@ void nxagentRandRSetWindowsSize(int width, int height) if (height == 0) { - if (nxagentOption(Fullscreen) == 1) + if (nxagentOption(Fullscreen)) { height = HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay)); } @@ -420,7 +420,7 @@ void nxagentRandRSetWindowsSize(int width, int height) XResizeWindow(nxagentDisplay, nxagentDefaultWindows[0], width, height); - if (nxagentOption(Rootless) == 0) + if (!nxagentOption(Rootless)) { XMoveResizeWindow(nxagentDisplay, nxagentInputWindows[0], 0, 0, width, height); @@ -434,8 +434,8 @@ int nxagentRandRScreenSetSize(ScreenPtr pScreen, CARD16 width, CARD16 height, UpdateCurrentTime(); - if (nxagentOption(DesktopResize) == 1 && - (nxagentOption(Fullscreen) == 1 || + if (nxagentOption(DesktopResize) && + (nxagentOption(Fullscreen) || width > WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay)) || height > HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay)))) { @@ -446,8 +446,8 @@ int nxagentRandRScreenSetSize(ScreenPtr pScreen, CARD16 width, CARD16 height, } } - if (nxagentOption(DesktopResize) == 1 && nxagentOption(Fullscreen) == 0 && - nxagentOption(AllScreens) == 0) + if (nxagentOption(DesktopResize) && !nxagentOption(Fullscreen) && + !nxagentOption(AllScreens)) { nxagentChangeOption(Width, width); nxagentChangeOption(Height, height); @@ -455,8 +455,8 @@ int nxagentRandRScreenSetSize(ScreenPtr pScreen, CARD16 width, CARD16 height, result = nxagentResizeScreen(pScreen, width, height, mmWidth, mmHeight); - if (result == 1 && nxagentOption(DesktopResize) == 1 && - nxagentOption(Fullscreen) == 0 && nxagentOption(AllScreens) == 0) + if (result == 1 && nxagentOption(DesktopResize) && + !nxagentOption(Fullscreen) && !nxagentOption(AllScreens)) { nxagentRandRSetWindowsSize(width, height); nxagentSetWMNormalHints(pScreen -> myNum, nxagentOption(Width), nxagentOption(Height)); -- cgit v1.2.3