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
6bca289a
Unverified
Commit
6bca289a
authored
Aug 27, 2019
by
Mike Gabriel
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'uli42-gh-sunweaver/pr/autograb-without-inputlock' into 3.6.x
Attributes GH PR #835:
https://github.com/ArcticaProject/nx-libs/pull/835
parents
daa50fd8
6181aa91
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
296 additions
and
14 deletions
+296
-14
README.keystrokes
doc/nxagent/README.keystrokes
+3
-0
keystrokes.cfg
etc/keystrokes.cfg
+1
-0
Args.c
nx-X11/programs/Xserver/hw/nxagent/Args.c
+22
-0
Dialog.c
nx-X11/programs/Xserver/hw/nxagent/Dialog.c
+50
-0
Dialog.h
nx-X11/programs/Xserver/hw/nxagent/Dialog.h
+30
-0
Events.c
nx-X11/programs/Xserver/hw/nxagent/Events.c
+152
-11
Events.h
nx-X11/programs/Xserver/hw/nxagent/Events.h
+2
-1
Keystroke.c
nx-X11/programs/Xserver/hw/nxagent/Keystroke.c
+8
-1
Keystroke.h
nx-X11/programs/Xserver/hw/nxagent/Keystroke.h
+2
-0
Options.c
nx-X11/programs/Xserver/hw/nxagent/Options.c
+2
-0
Options.h
nx-X11/programs/Xserver/hw/nxagent/Options.h
+7
-0
Window.c
nx-X11/programs/Xserver/hw/nxagent/Window.c
+10
-1
nxagent.1
nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1
+7
-0
No files found.
doc/nxagent/README.keystrokes
View file @
6bca289a
...
...
@@ -126,6 +126,9 @@ reread_keystrokes
Forces nxagent to re-read the keystroke configuration. Useful to
add/change keystrokes to a running session.
autograb
Toggles autograb mode
force_synchronization
Forces immediate drawing of elements to be synchronized which can
fix some visual bugs.
etc/keystrokes.cfg
View file @
6bca289a
...
...
@@ -24,4 +24,5 @@
<keystroke
action=
"viewport_scroll_down"
Control=
"1"
AltMeta=
"1"
key=
"Down"
/>
<keystroke
action=
"viewport_scroll_down"
Control=
"1"
AltMeta=
"1"
key=
"KP_Down"
/>
<keystroke
action=
"reread_keystrokes"
Control=
"1"
AltMeta=
"1"
key=
"k"
/>
<keystroke
action=
"autograb"
Control=
"1"
AltMeta=
"1"
key=
"g"
/>
</keystrokes>
nx-X11/programs/Xserver/hw/nxagent/Args.c
View file @
6bca289a
...
...
@@ -1039,6 +1039,14 @@ int ddxProcessArgument(int argc, char *argv[], int i)
return
0
;
}
if
(
!
strcmp
(
argv
[
i
],
"-autograb"
))
{
nxagentChangeOption
(
AutoGrab
,
True
);
return
1
;
}
/*
* Disable Xinerama (i.e. fake it in Screen.c) if somehow Xinerama support
* has been disabled on the cmdline.
...
...
@@ -1539,6 +1547,19 @@ static void nxagentParseSingleOption(char *name, char *value)
return
;
}
else
if
(
!
strcmp
(
name
,
"autograb"
))
{
if
(
!
strcmp
(
value
,
"0"
))
{
nxagentChangeOption
(
AutoGrab
,
False
);
}
else
{
nxagentChangeOption
(
AutoGrab
,
True
);
}
return
;
}
else
{
#ifdef DEBUG
...
...
@@ -2195,6 +2216,7 @@ void ddxUseMsg(void)
ErrorF
(
"-noignore don't ignore pointer and keyboard configuration changes mandated by clients
\n
"
);
ErrorF
(
"-nokbreset don't reset keyboard device if the session is resumed
\n
"
);
ErrorF
(
"-noxkblock always allow applications to change layout through XKEYBOARD
\n
"
);
ErrorF
(
"-autograb enable autograb
\n
"
);
ErrorF
(
"-tile WxH size of image tiles (minimum allowed: 32x32)
\n
"
);
ErrorF
(
"-keystrokefile file file with keyboard shortcut definitions
\n
"
);
ErrorF
(
"-verbose print more warning and error messages
\n
"
);
...
...
nx-X11/programs/Xserver/hw/nxagent/Dialog.c
View file @
6bca289a
...
...
@@ -63,6 +63,8 @@ int nxagentEnableRandRModeDialogPid = 0;
int
nxagentDisableRandRModeDialogPid
=
0
;
int
nxagentEnableDeferModePid
=
0
;
int
nxagentDisableDeferModePid
=
0
;
int
nxagentEnableAutograbModePid
=
0
;
int
nxagentDisableAutograbModePid
=
0
;
static
int
nxagentFailedReconnectionDialogPid
=
0
;
...
...
@@ -158,6 +160,24 @@ void nxagentResetDialog(int pid)
nxagentDisableDeferModePid
=
0
;
}
else
if
(
pid
==
nxagentEnableAutograbModePid
)
{
#ifdef TEST
fprintf
(
stderr
,
"nxagentResetDialog: Resetting enable autograb mode dialog pid [%d].
\n
"
,
nxagentEnableAutograbModePid
);
#endif
nxagentEnableAutograbModePid
=
0
;
}
else
if
(
pid
==
nxagentDisableAutograbModePid
)
{
#ifdef TEST
fprintf
(
stderr
,
"nxagentResetDialog: Resetting disable autograb mode dialog pid [%d].
\n
"
,
nxagentDisableAutograbModePid
);
#endif
nxagentDisableAutograbModePid
=
0
;
}
}
void
nxagentLaunchDialog
(
DialogType
dialogType
)
...
...
@@ -263,6 +283,24 @@ void nxagentLaunchDialog(DialogType dialogType)
break
;
}
case
DIALOG_ENABLE_AUTOGRAB_MODE
:
{
message
=
DIALOG_ENABLE_AUTOGRAB_MODE_MESSAGE
;
type
=
DIALOG_ENABLE_AUTOGRAB_MODE_TYPE
;
local
=
DIALOG_ENABLE_AUTOGRAB_MODE_LOCAL
;
pid
=
&
nxagentEnableAutograbModePid
;
break
;
}
case
DIALOG_DISABLE_AUTOGRAB_MODE
:
{
message
=
DIALOG_DISABLE_AUTOGRAB_MODE_MESSAGE
;
type
=
DIALOG_DISABLE_AUTOGRAB_MODE_TYPE
;
local
=
DIALOG_DISABLE_AUTOGRAB_MODE_LOCAL
;
pid
=
&
nxagentDisableAutograbModePid
;
break
;
}
default:
{
#ifdef WARNING
...
...
@@ -496,6 +534,18 @@ void nxagentTerminateDialog(DialogType type)
break
;
}
case
DIALOG_ENABLE_AUTOGRAB_MODE
:
{
pid
=
nxagentEnableAutograbModePid
;
break
;
}
case
DIALOG_DISABLE_AUTOGRAB_MODE
:
{
pid
=
nxagentDisableAutograbModePid
;
break
;
}
default:
{
#ifdef WARNING
...
...
nx-X11/programs/Xserver/hw/nxagent/Dialog.h
View file @
6bca289a
...
...
@@ -41,6 +41,8 @@ typedef enum
DIALOG_FAILED_RECONNECTION
,
DIALOG_ENABLE_DEFER_MODE
,
DIALOG_DISABLE_DEFER_MODE
,
DIALOG_ENABLE_AUTOGRAB_MODE
,
DIALOG_DISABLE_AUTOGRAB_MODE
,
DIALOG_LAST_TAG
}
DialogType
;
...
...
@@ -54,6 +56,8 @@ extern int nxagentEnableRandRModeDialogPid;
extern
int
nxagentDisableRandRModeDialogPid
;
extern
int
nxagentEnableDeferModePid
;
extern
int
nxagentDisableDeferModePid
;
extern
int
nxagentEnableAutograbModePid
;
extern
int
nxagentDisableAutograbModePid
;
#define NXAGENTFAILEDRECONNECTIONMESSAGELENGTH 256
extern
char
nxagentFailedReconnectionMessage
[
NXAGENTFAILEDRECONNECTIONMESSAGELENGTH
];
...
...
@@ -87,6 +91,8 @@ extern void nxagentTerminateDialogs(void);
(type) == DIALOG_FAILED_RECONNECTION ? "DIALOG_FAILED_RECONNECTION" : \
(type) == DIALOG_ENABLE_DEFER_MODE ? "DIALOG_ENABLE_DEFER_MODE" : \
(type) == DIALOG_DISABLE_DEFER_MODE ? "DIALOG_DISABLE_DEFER_MODE" : \
(type) == DIALOG_ENABLE_AUTOGRAB_MODE ? "DIALOG_ENABLE_AUTGRAB_MODE" : \
(type) == DIALOG_DISABLE_AUTOGRAB_MODE ? "DIALOG_DISABLE_AUTOGRAB_MODE" : \
"UNKNOWN_DIALOG")
/*
...
...
@@ -214,5 +220,29 @@ Ctrl+Alt+E to enable it again.\
#define DIALOG_DISABLE_DEFER_MODE_LOCAL 0
#define DIALOG_ENABLE_AUTOGRAB_MODE_MESSAGE \
\
"\
Keyboard auto-grabbing mode is now enabled. You can press\n\
Ctrl+Alt+G again to disable auto-grabbing.\
"
#define DIALOG_ENABLE_AUTOGRAB_MODE_TYPE "ok"
#define DIALOG_ENABLE_AUTOGRAB_MODE_LOCAL 0
#define DIALOG_DISABLE_AUTOGRAB_MODE_MESSAGE \
\
"\
Keyboard auto-grabbing mode is now disabled. You can press\n\
Ctrl+Alt+G again to re-enable auto-grabbing.\
"
#define DIALOG_DISABLE_AUTOGRAB_MODE_TYPE "ok"
#define DIALOG_DISABLE_AUTOGRAB_MODE_LOCAL 0
#endif
/* __Dialog_H__ */
nx-X11/programs/Xserver/hw/nxagent/Events.c
View file @
6bca289a
...
...
@@ -115,6 +115,15 @@
#undef TEST
#undef DEBUG
/* debug individual subsystems */
#undef DEBUG_AUTOGRAB
/* aktivate subsystems if generic DEBUG is activated */
#ifdef DEBUG
#ifndef DEBUG_AUTOGRAB
#define DEBUG_AUTOGRAB
#endif
#endif
/*
* Log begin and end of the important handlers.
*/
...
...
@@ -292,6 +301,36 @@ void ProcessInputEvents(void)
mieqProcessInputEvents
();
}
#ifdef DEBUG
char
*
nxagentGetNotifyMode
(
int
mode
)
{
switch
(
mode
)
{
case
NotifyNormal
:
{
return
"NotifyNormal"
;
break
;
}
case
NotifyGrab
:
{
return
"NotifyGrab"
;
break
;
}
case
NotifyUngrab
:
{
return
"NotifyUngrab"
;
break
;
}
case
NotifyWhileGrabbed
:
{
return
"NotifyWhileGrabbed"
;
break
;
}
}
return
"Unknown"
;
}
#endif
#ifdef DEBUG_TREE
/*
...
...
@@ -674,6 +713,40 @@ static void nxagentSwitchDeferMode(void)
}
}
static
void
nxagentEnableAutoGrab
(
void
)
{
#ifdef DEBUG_AUTOGRAB
fprintf
(
stderr
,
"enabling autograb
\n
"
);
#endif
nxagentGrabPointerAndKeyboard
(
NULL
);
nxagentChangeOption
(
AutoGrab
,
True
);
nxagentLaunchDialog
(
DIALOG_ENABLE_AUTOGRAB_MODE
);
}
static
void
nxagentDisableAutoGrab
(
void
)
{
#ifdef DEBUG_AUTOGRAB
fprintf
(
stderr
,
"disabling autograb
\n
"
);
#endif
nxagentUngrabPointerAndKeyboard
(
NULL
);
nxagentChangeOption
(
AutoGrab
,
False
);
nxagentLaunchDialog
(
DIALOG_DISABLE_AUTOGRAB_MODE
);
}
static
void
nxagentToggleAutoGrab
(
void
)
{
/* autograb only works in windowed mode */
if
(
nxagentOption
(
Rootless
)
||
nxagentOption
(
Fullscreen
))
return
;
if
(
!
nxagentOption
(
AutoGrab
))
nxagentEnableAutoGrab
();
else
nxagentDisableAutoGrab
();
}
static
Bool
nxagentExposurePredicate
(
Display
*
display
,
XEvent
*
event
,
XPointer
window
)
{
/*
...
...
@@ -1060,6 +1133,12 @@ void nxagentDispatchEvents(PredicateFuncPtr predicate)
break
;
}
case
doAutoGrab
:
{
nxagentToggleAutoGrab
();
break
;
}
default:
{
FatalError
(
"nxagentDispatchEvent: handleKeyPress returned unknown value
\n
"
);
...
...
@@ -1492,8 +1571,18 @@ FIXME: Don't enqueue the KeyRelease event if the key was
{
WindowPtr
pWin
;
#ifdef TEST
fprintf
(
stderr
,
"nxagentDispatchEvents: Going to handle new FocusIn event.
\n
"
);
#ifdef DEBUG
fprintf
(
stderr
,
"%s: Going to handle new FocusIn event [0x%x] mode: [%s]
\n
"
,
__func__
,
X
.
xfocus
.
window
,
nxagentGetNotifyMode
(
X
.
xfocus
.
mode
));
{
XlibWindow
w
;
int
revert_to
;
XGetInputFocus
(
nxagentDisplay
,
&
w
,
&
revert_to
);
fprintf
(
stderr
,
"%s: (FocusIn): Event win [0x%x] Focus owner [0x%x] nxagentDefaultWindows[0] [0x%x]
\n
"
,
__func__
,
X
.
xfocus
.
window
,
w
,
nxagentDefaultWindows
[
0
]);
}
#else
#ifdef TEST
fprintf
(
stderr
,
"%s: Going to handle new FocusIn event
\n
"
,
__func__
);
#endif
#endif
/*
...
...
@@ -1519,12 +1608,34 @@ FIXME: Don't enqueue the KeyRelease event if the key was
}
}
if
(
nxagentOption
(
AutoGrab
)
&&
!
(
nxagentOption
(
AllScreens
)
||
nxagentOption
(
Fullscreen
)
||
nxagentOption
(
Rootless
)))
{
if
(
X
.
xfocus
.
window
==
nxagentDefaultWindows
[
0
]
&&
X
.
xfocus
.
mode
==
NotifyNormal
)
{
#if defined(DEBUG) || defined(DEBUG_AUTOGRAB)
fprintf
(
stderr
,
"%s: (FocusIn): grabbing
\n
"
,
__func__
);
#endif
nxagentGrabPointerAndKeyboard
(
NULL
);
}
/* else
{
#if defined(DEBUG) || defined(DEBUG_AUTOGRAB)
fprintf(stderr, "%s: (FocusIn): ungrabbing\n", __func__);
#endif
nxagentUngrabPointerAndKeyboard(NULL);
}
*/
}
break
;
}
case
FocusOut
:
{
#ifdef TEST
fprintf
(
stderr
,
"nxagentDispatchEvents: Going to handle new FocusOut event.
\n
"
);
#ifdef DEBUG
fprintf
(
stderr
,
"%s: Going to handle new FocusOut event [0x%x] mode: [%s]
\n
"
,
__func__
,
X
.
xfocus
.
window
,
nxagentGetNotifyMode
(
X
.
xfocus
.
mode
));
#else
#ifdef TEST
fprintf
(
stderr
,
"%s: Going to handle new FocusOut event.
\n
"
,
__func__
);
#endif
#endif
if
(
X
.
xfocus
.
detail
!=
NotifyInferior
)
...
...
@@ -1597,6 +1708,19 @@ FIXME: Don't enqueue the KeyRelease event if the key was
#endif
/* NXAGENT_FIXKEYS */
if
(
nxagentOption
(
AutoGrab
)
&&
!
nxagentFullscreenWindow
)
{
XlibWindow
w
;
int
revert_to
;
XGetInputFocus
(
nxagentDisplay
,
&
w
,
&
revert_to
);
if
(
w
!=
nxagentDefaultWindows
[
0
]
&&
X
.
xfocus
.
mode
==
NotifyWhileGrabbed
)
{
#if defined(DEBUG) || defined(DEBUG_AUTOGRAB)
fprintf
(
stderr
,
"%s: (FocusOut): ungrabbing
\n
"
,
__func__
);
#endif
nxagentUngrabPointerAndKeyboard
(
NULL
);
}
}
break
;
}
case
KeymapNotify
:
...
...
@@ -1732,11 +1856,14 @@ FIXME: Don't enqueue the KeyRelease event if the key was
nxagentLastEnteredWindow
=
NULL
;
}
if
(
X
.
xcrossing
.
window
==
nxagentDefaultWindows
[
0
]
&&
X
.
xcrossing
.
detail
!=
NotifyInferior
&&
X
.
xcrossing
.
mode
==
NotifyNormal
)
if
(
!
nxagentOption
(
AutoGrab
))
{
nxagentUngrabPointerAndKeyboard
(
&
X
);
if
(
X
.
xcrossing
.
window
==
nxagentDefaultWindows
[
0
]
&&
X
.
xcrossing
.
detail
!=
NotifyInferior
&&
X
.
xcrossing
.
mode
==
NotifyNormal
)
{
nxagentUngrabPointerAndKeyboard
(
&
X
);
}
}
if
(
X
.
xcrossing
.
detail
!=
NotifyInferior
)
...
...
@@ -3827,13 +3954,26 @@ void nxagentGrabPointerAndKeyboard(XEvent *X)
fprintf
(
stderr
,
"nxagentGrabPointerAndKeyboard: Going to grab the keyboard in context [B1].
\n
"
);
#endif
result
=
XGrabKeyboard
(
nxagentDisplay
,
nxagentFullscreenWindow
,
True
,
GrabModeAsync
,
GrabModeAsync
,
now
);
if
(
nxagentFullscreenWindow
)
result
=
XGrabKeyboard
(
nxagentDisplay
,
nxagentFullscreenWindow
,
True
,
GrabModeAsync
,
GrabModeAsync
,
now
);
else
result
=
XGrabKeyboard
(
nxagentDisplay
,
RootWindow
(
nxagentDisplay
,
DefaultScreen
(
nxagentDisplay
)),
True
,
GrabModeAsync
,
GrabModeAsync
,
now
);
if
(
result
!=
GrabSuccess
)
{
#ifdef DEBUG
fprintf
(
stderr
,
"%s: keyboard grab failed.
\n
"
,
__func__
);
#endif
return
;
}
#ifdef DEBUG
else
{
fprintf
(
stderr
,
"%s: keyboard grab successful.
\n
"
,
__func__
);
}
#endif
/*
* The smart scheduler could be stopped while
...
...
@@ -3851,7 +3991,8 @@ void nxagentGrabPointerAndKeyboard(XEvent *X)
resource
=
nxagentWaitForResource
(
NXGetCollectGrabPointerResource
,
nxagentCollectGrabPointerPredicate
);
NXCollectGrabPointer
(
nxagentDisplay
,
resource
,
if
(
nxagentFullscreenWindow
)
NXCollectGrabPointer
(
nxagentDisplay
,
resource
,
nxagentFullscreenWindow
,
True
,
NXAGENT_POINTER_EVENT_MASK
,
GrabModeAsync
,
GrabModeAsync
,
None
,
None
,
now
);
...
...
nx-X11/programs/Xserver/hw/nxagent/Events.h
View file @
6bca289a
...
...
@@ -50,7 +50,8 @@ enum HandleEventResult
doViewportRight
,
doViewportDown
,
doSwitchResizeMode
,
doSwitchDeferMode
doSwitchDeferMode
,
doAutoGrab
,
};
extern
CARD32
nxagentLastEventTime
;
...
...
nx-X11/programs/Xserver/hw/nxagent/Keystroke.c
View file @
6bca289a
...
...
@@ -99,6 +99,9 @@ char * nxagentSpecialKeystrokeNames[] = {
"viewport_scroll_down"
,
"reread_keystrokes"
,
"autograb"
,
NULL
,
};
...
...
@@ -138,6 +141,7 @@ struct nxagentSpecialKeystrokeMap default_map[] = {
{
KEYSTROKE_VIEWPORT_SCROLL_DOWN
,
ControlMask
,
True
,
XK_Down
},
{
KEYSTROKE_VIEWPORT_SCROLL_DOWN
,
ControlMask
,
True
,
XK_KP_Down
},
{
KEYSTROKE_REREAD_KEYSTROKES
,
ControlMask
,
True
,
XK_k
},
{
KEYSTROKE_AUTOGRAB
,
ControlMask
,
True
,
XK_g
},
{
KEYSTROKE_END_MARKER
,
0
,
False
,
NoSymbol
},
};
struct
nxagentSpecialKeystrokeMap
*
map
=
default_map
;
...
...
@@ -467,7 +471,7 @@ static enum nxagentSpecialKeystroke find_keystroke(XKeyEvent *X)
#endif
for
(
struct
nxagentSpecialKeystrokeMap
*
cur
=
map
;
cur
->
stroke
!=
KEYSTROKE_END_MARKER
;
cur
++
)
{
#ifdef DEBUG
fprintf
(
stderr
,
"%s: checking keysym '%c' (%d)
\n
"
,
__func__
,
cur
->
keysym
,
cur
->
keysym
);
fprintf
(
stderr
,
"%s: keysym %d stroke %d, type %d
\n
"
,
__func__
,
cur
->
keysym
,
cur
->
stroke
,
X
->
type
);
#endif
if
(
cur
->
keysym
==
keysym
&&
modifier_matches
(
cur
->
modifierMask
,
cur
->
modifierAltMeta
,
X
->
state
))
{
#ifdef DEBUG
...
...
@@ -627,6 +631,9 @@ Bool nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result)
if
(
X
->
type
==
KeyRelease
)
nxagentInitKeystrokes
(
True
);
break
;
case
KEYSTROKE_AUTOGRAB
:
*
result
=
doAutoGrab
;
break
;
case
KEYSTROKE_NOTHING
:
/* do nothing. difference to KEYSTROKE_IGNORE is the return value */
case
KEYSTROKE_END_MARKER
:
/* just to make gcc STFU */
case
KEYSTROKE_MAX
:
...
...
nx-X11/programs/Xserver/hw/nxagent/Keystroke.h
View file @
6bca289a
...
...
@@ -73,6 +73,8 @@ enum nxagentSpecialKeystroke {
KEYSTROKE_REREAD_KEYSTROKES
,
KEYSTROKE_AUTOGRAB
,
KEYSTROKE_NOTHING
,
/* insert more here and in the string translation */
...
...
nx-X11/programs/Xserver/hw/nxagent/Options.c
View file @
6bca289a
...
...
@@ -172,6 +172,8 @@ void nxagentInitOptions(void)
nxagentOptions
.
ReconnectTolerance
=
DEFAULT_TOLERANCE
;
nxagentOptions
.
KeycodeConversion
=
DEFAULT_KEYCODE_CONVERSION
;
nxagentOptions
.
AutoGrab
=
False
;
}
/*
...
...
nx-X11/programs/Xserver/hw/nxagent/Options.h
View file @
6bca289a
...
...
@@ -450,6 +450,13 @@ typedef struct _AgentOptions
* Convert evdev keycodes to pc105.
*/
KeycodeConversionMode
KeycodeConversion
;
/*
* True if agent should grab the input in windowed mode whenever the
* agent window gets the focus
*/
int
AutoGrab
;
/* Should be Bool but I do not want to include Xlib.h here */
}
AgentOptionsRec
;
typedef
AgentOptionsRec
*
AgentOptionsPtr
;
...
...
nx-X11/programs/Xserver/hw/nxagent/Window.c
View file @
6bca289a
...
...
@@ -754,7 +754,12 @@ void nxagentSwitchFullscreen(ScreenPtr pScreen, Bool switchOn)
else
{
nxagentFullscreenWindow
=
None
;
nxagentUngrabPointerAndKeyboard
(
NULL
);
/* if we had AutoGrab before entering fullscreen reactivate it now */
if
(
nxagentOption
(
AutoGrab
))
nxagentGrabPointerAndKeyboard
(
NULL
);
else
nxagentUngrabPointerAndKeyboard
(
NULL
);
}
}
...
...
@@ -1005,6 +1010,10 @@ void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn)
XMoveResizeWindow
(
nxagentDisplay
,
nxagentInputWindows
[
0
],
0
,
0
,
nxagentOption
(
Width
),
nxagentOption
(
Height
));
/* if we had AutoGrab before entering fullscreen reactivate it now */
if
(
nxagentOption
(
AutoGrab
))
nxagentGrabPointerAndKeyboard
(
NULL
);
nxagentSetPrintGeometry
(
pScreen
->
myNum
);
}
...
...
nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1
View file @
6bca289a
...
...
@@ -457,6 +457,9 @@ The nx-X11 system adds the following command line arguments:
.B \-forcenx
force use of NX protocol messages assuming communication through \fBnxproxy\fR
.TP 8
.B \-autograb
enable autograb mode on \fBnxagent\fR startup. The autograb feature can be toggled via nxagent keystrokes
.TP 8
.B \-nxrealwindowprop
set property NX_REAL_WINDOW for each X11 client inside \fBnxagent\fR,
providing the window XID of the corresponding window object on the X
...
...
@@ -753,6 +756,10 @@ format must be included in both. This is potentially unsafe.
means that all of these checks are essentially
deactivated. This is a very bad idea.
.RE
.TP 8
.B autograb=<int>
enable or disable autograb (default: disabled)
.RE
If you want to use \fBnxagent\fR as a replacement for Xnest or Xephyr you
can pass options like this:
...
...
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