Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nx-libs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dimbor
nx-libs
Commits
de5eb54c
Commit
de5eb54c
authored
Dec 30, 2020
by
Ulrich Sibiller
Committed by
Mike Gabriel
Jan 15, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nxagent: make Fullscreen and AllScreens Booleans
There's no need/sense in having a tri-state with the third state being UNDEFINED.
parent
d545afdf
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
35 deletions
+29
-35
Args.c
nx-X11/programs/Xserver/hw/nxagent/Args.c
+2
-12
Events.c
nx-X11/programs/Xserver/hw/nxagent/Events.c
+9
-9
Extensions.c
nx-X11/programs/Xserver/hw/nxagent/Extensions.c
+6
-6
Options.c
nx-X11/programs/Xserver/hw/nxagent/Options.c
+2
-1
Screen.c
nx-X11/programs/Xserver/hw/nxagent/Screen.c
+8
-5
Window.c
nx-X11/programs/Xserver/hw/nxagent/Window.c
+2
-2
No files found.
nx-X11/programs/Xserver/hw/nxagent/Args.c
View file @
de5eb54c
...
...
@@ -589,7 +589,7 @@ int ddxProcessArgument(int argc, char *argv[], int i)
}
}
if
(
nxagentUserGeometry
.
flag
||
(
nxagentOption
(
Fullscreen
)
==
1
))
if
(
nxagentUserGeometry
.
flag
||
(
nxagentOption
(
Fullscreen
)))
{
return
2
;
}
...
...
@@ -1749,7 +1749,7 @@ N/A
#endif
if
((
nxagentOption
(
Rootless
)
==
1
)
&&
nxagentOption
(
Fullscreen
)
==
1
)
if
((
nxagentOption
(
Rootless
)
==
1
)
&&
nxagentOption
(
Fullscreen
))
{
#ifdef TEST
fprintf
(
stderr
,
"WARNING: Ignoring fullscreen option for rootless session.
\n
"
);
...
...
@@ -1974,16 +1974,6 @@ N/A
* Set the other defaults.
*/
if
(
nxagentOption
(
Fullscreen
)
==
UNDEFINED
)
{
nxagentChangeOption
(
Fullscreen
,
False
);
}
if
(
nxagentOption
(
AllScreens
)
==
UNDEFINED
)
{
nxagentChangeOption
(
AllScreens
,
False
);
}
if
(
nxagentOption
(
Binder
)
==
UNDEFINED
)
{
nxagentChangeOption
(
Binder
,
False
);
...
...
nx-X11/programs/Xserver/hw/nxagent/Events.c
View file @
de5eb54c
...
...
@@ -575,7 +575,7 @@ void nxagentSwitchResizeMode(ScreenPtr pScreen)
nxagentLaunchDialog
(
DIALOG_DISABLE_DESKTOP_RESIZE_MODE
);
if
(
nxagentOption
(
Fullscreen
)
==
0
)
if
(
!
nxagentOption
(
Fullscreen
)
)
{
nxagentSetWMNormalHintsMaxsize
(
pScreen
,
nxagentOption
(
RootWidth
),
...
...
@@ -1724,7 +1724,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was not already
nxagentScreenTrap
=
False
;
}
if
(
nxagentOption
(
Fullscreen
)
==
1
&&
if
(
nxagentOption
(
Fullscreen
)
&&
X
.
xcrossing
.
window
==
nxagentFullscreenWindow
&&
X
.
xcrossing
.
detail
!=
NotifyInferior
)
{
...
...
@@ -2057,7 +2057,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was not already
}
}
if
(
nxagentOption
(
AllScreens
)
==
1
)
if
(
nxagentOption
(
AllScreens
))
{
if
(
X
.
xmap
.
window
==
nxagentIconWindow
)
{
...
...
@@ -2066,7 +2066,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was not already
}
}
if
(
nxagentOption
(
Fullscreen
)
==
1
)
if
(
nxagentOption
(
Fullscreen
))
{
nxagentVisibility
=
VisibilityUnobscured
;
nxagentVisibilityStop
=
False
;
...
...
@@ -2185,7 +2185,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was not already
if
(
switchFullscreen
)
{
if
(
nxagentOption
(
AllScreens
)
==
1
&&
nxagentOption
(
Fullscreen
)
==
1
)
if
(
nxagentOption
(
AllScreens
)
&&
nxagentOption
(
Fullscreen
)
)
{
nxagentSwitchAllScreens
(
pScreen
,
0
);
}
...
...
@@ -2197,7 +2197,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was not already
if
(
switchAllScreens
)
{
if
(
nxagentOption
(
AllScreens
)
==
0
&&
nxagentOption
(
Fullscreen
)
==
1
)
if
(
!
nxagentOption
(
AllScreens
)
&&
nxagentOption
(
Fullscreen
)
)
{
nxagentSwitchFullscreen
(
pScreen
,
False
);
}
...
...
@@ -3291,7 +3291,7 @@ int nxagentHandleConfigureNotify(XEvent* X)
if
(
X
->
xconfigure
.
window
==
nxagentDefaultWindows
[
pScreen
->
myNum
])
{
if
(
nxagentOption
(
AllScreens
)
==
0
)
if
(
!
nxagentOption
(
AllScreens
)
)
{
/*
* - WITHOUT window manager any position change is relevant
...
...
@@ -3409,7 +3409,7 @@ int nxagentHandleConfigureNotify(XEvent* X)
XMoveResizeWindow
(
nxagentDisplay
,
nxagentInputWindows
[
0
],
0
,
0
,
X
->
xconfigure
.
width
,
X
->
xconfigure
.
height
);
if
(
nxagentOption
(
Fullscreen
)
==
0
)
if
(
!
nxagentOption
(
Fullscreen
)
)
{
/* FIXME: has already been done some lines above */
nxagentMoveViewport
(
pScreen
,
0
,
0
);
...
...
@@ -3592,7 +3592,7 @@ int nxagentHandleReparentNotify(XEvent* X)
return
1
;
}
else
if
(
nxagentWMIsRunning
&&
nxagentOption
(
Fullscreen
)
==
0
&&
else
if
(
nxagentWMIsRunning
&&
!
nxagentOption
(
Fullscreen
)
&&
nxagentOption
(
WMBorderWidth
)
==
-
1
)
{
/*
...
...
nx-X11/programs/Xserver/hw/nxagent/Extensions.c
View file @
de5eb54c
...
...
@@ -393,7 +393,7 @@ void nxagentRandRSetWindowsSize(int width, int height)
{
if
(
width
==
0
)
{
if
(
nxagentOption
(
Fullscreen
)
==
1
)
if
(
nxagentOption
(
Fullscreen
))
{
width
=
WidthOfScreen
(
DefaultScreenOfDisplay
(
nxagentDisplay
));
}
...
...
@@ -405,7 +405,7 @@ void nxagentRandRSetWindowsSize(int width, int height)
if
(
height
==
0
)
{
if
(
nxagentOption
(
Fullscreen
)
==
1
)
if
(
nxagentOption
(
Fullscreen
))
{
height
=
HeightOfScreen
(
DefaultScreenOfDisplay
(
nxagentDisplay
));
}
...
...
@@ -430,7 +430,7 @@ int nxagentRandRScreenSetSize(ScreenPtr pScreen, CARD16 width, CARD16 height,
UpdateCurrentTime
();
if
(
nxagentOption
(
DesktopResize
)
==
1
&&
(
nxagentOption
(
Fullscreen
)
==
1
||
(
nxagentOption
(
Fullscreen
)
||
width
>
WidthOfScreen
(
DefaultScreenOfDisplay
(
nxagentDisplay
))
||
height
>
HeightOfScreen
(
DefaultScreenOfDisplay
(
nxagentDisplay
))))
{
...
...
@@ -441,8 +441,8 @@ int nxagentRandRScreenSetSize(ScreenPtr pScreen, CARD16 width, CARD16 height,
}
}
if
(
nxagentOption
(
DesktopResize
)
==
1
&&
nxagentOption
(
Fullscreen
)
==
0
&&
nxagentOption
(
AllScreens
)
==
0
)
if
(
nxagentOption
(
DesktopResize
)
==
1
&&
!
nxagentOption
(
Fullscreen
)
&&
!
nxagentOption
(
AllScreens
)
)
{
nxagentChangeOption
(
Width
,
width
);
nxagentChangeOption
(
Height
,
height
);
...
...
@@ -451,7 +451,7 @@ int nxagentRandRScreenSetSize(ScreenPtr pScreen, CARD16 width, CARD16 height,
int
result
=
nxagentResizeScreen
(
pScreen
,
width
,
height
,
mmWidth
,
mmHeight
,
True
);
if
(
result
==
1
&&
nxagentOption
(
DesktopResize
)
==
1
&&
nxagentOption
(
Fullscreen
)
==
0
&&
nxagentOption
(
AllScreens
)
==
0
)
!
nxagentOption
(
Fullscreen
)
&&
!
nxagentOption
(
AllScreens
)
)
{
nxagentRandRSetWindowsSize
(
width
,
height
);
nxagentSetWMNormalHints
(
pScreen
->
myNum
,
nxagentOption
(
Width
),
nxagentOption
(
Height
));
...
...
nx-X11/programs/Xserver/hw/nxagent/Options.c
View file @
de5eb54c
...
...
@@ -62,7 +62,8 @@ void nxagentInitOptions(void)
nxagentOptions
.
Desktop
=
UNDEFINED
;
nxagentOptions
.
Persistent
=
1
;
nxagentOptions
.
Rootless
=
UNDEFINED
;
nxagentOptions
.
Fullscreen
=
UNDEFINED
;
nxagentOptions
.
Fullscreen
=
False
;
nxagentOptions
.
AllScreens
=
False
;
nxagentOptions
.
NoRootlessExit
=
False
;
nxagentOptions
.
X
=
0
;
...
...
nx-X11/programs/Xserver/hw/nxagent/Screen.c
View file @
de5eb54c
...
...
@@ -800,6 +800,9 @@ void nxagentPrintAgentGeometry(char *hdrMessage, char *prefix)
fprintf
(
stderr
,
"%s | Fullscreen is %s.
\n
"
,
prefix
,
nxagentOption
(
Fullscreen
)
?
"ON"
:
"OFF"
);
fprintf
(
stderr
,
"%s | AllScreens is %s.
\n
"
,
prefix
,
nxagentOption
(
AllScreens
)
?
"ON"
:
"OFF"
);
fprintf
(
stderr
,
"%s | Desktop resize mode is %s.
\n
"
,
prefix
,
nxagentOption
(
DesktopResize
)
?
"ON"
:
"OFF"
);
...
...
@@ -1664,13 +1667,13 @@ N/A
.
colormap
=
nxagentDefaultVisualColormap
(
nxagentDefaultVisual
(
pScreen
))
};
if
(
nxagentOption
(
AllScreens
)
==
1
)
if
(
nxagentOption
(
AllScreens
))
{
valuemask
|=
CWOverrideRedirect
;
attributes
.
override_redirect
=
True
;
}
if
(
nxagentOption
(
Fullscreen
)
==
1
)
if
(
nxagentOption
(
Fullscreen
))
{
if
(
nxagentReconnectTrap
)
{
...
...
@@ -1833,7 +1836,7 @@ N/A
sizeHints
->
width
=
nxagentOption
(
RootWidth
);
sizeHints
->
height
=
nxagentOption
(
RootHeight
);
if
(
nxagentOption
(
DesktopResize
)
==
1
||
nxagentOption
(
Fullscreen
)
==
1
)
if
(
nxagentOption
(
DesktopResize
)
==
1
||
nxagentOption
(
Fullscreen
))
{
sizeHints
->
max_width
=
WidthOfScreen
(
DefaultScreenOfDisplay
(
nxagentDisplay
));
sizeHints
->
max_height
=
HeightOfScreen
(
DefaultScreenOfDisplay
(
nxagentDisplay
));
...
...
@@ -2362,7 +2365,7 @@ FIXME: We should try to restore the previously
* Change agent window size and size hints.
*/
if
(
(
nxagentOption
(
Fullscreen
)
==
0
&&
nxagentOption
(
AllScreens
)
==
0
))
if
(
!
(
nxagentOption
(
Fullscreen
)
||
nxagentOption
(
AllScreens
)
))
{
nxagentSetWMNormalHints
(
pScreen
->
myNum
,
width
,
height
);
...
...
@@ -2566,7 +2569,7 @@ int nxagentShadowInit(ScreenPtr pScreen, WindowPtr pWin)
return
-
1
;
}
if
(
nxagentOption
(
Fullscreen
)
==
1
)
if
(
nxagentOption
(
Fullscreen
))
{
nxagentShadowSetRatio
(
WidthOfScreen
(
DefaultScreenOfDisplay
(
nxagentDisplay
))
*
1
.
0
/
nxagentShadowWidth
,
HeightOfScreen
(
DefaultScreenOfDisplay
(
nxagentDisplay
))
*
1
.
0
/
nxagentShadowHeight
);
...
...
nx-X11/programs/Xserver/hw/nxagent/Window.c
View file @
de5eb54c
...
...
@@ -2500,7 +2500,7 @@ void nxagentRefreshWindows(WindowPtr pWin)
void
nxagentUnmapWindows
(
void
)
{
if
(
nxagentOption
(
Fullscreen
)
==
1
)
if
(
nxagentOption
(
Fullscreen
))
{
for
(
int
i
=
0
;
i
<
screenInfo
.
numScreens
;
i
++
)
{
...
...
@@ -2556,7 +2556,7 @@ void nxagentMapDefaultWindows(void)
XMapWindow
(
nxagentDisplay
,
nxagentDefaultWindows
[
pScreen
->
myNum
]);
if
(
nxagentOption
(
Fullscreen
)
==
1
&&
nxagentWMIsRunning
)
if
(
nxagentOption
(
Fullscreen
)
&&
nxagentWMIsRunning
)
{
nxagentMaximizeToFullScreen
(
pScreen
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment