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
8bf3429b
You need to sign in or sign up before continuing.
Commit
8bf3429b
authored
Mar 16, 2017
by
Ulrich Sibiller
Committed by
Mike Gabriel
Aug 27, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nxagent: Make autograb an nxagentOption.
parent
58183b7c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
7 deletions
+14
-7
Events.c
nx-X11/programs/Xserver/hw/nxagent/Events.c
+5
-7
Options.c
nx-X11/programs/Xserver/hw/nxagent/Options.c
+2
-0
Options.h
nx-X11/programs/Xserver/hw/nxagent/Options.h
+7
-0
No files found.
nx-X11/programs/Xserver/hw/nxagent/Events.c
View file @
8bf3429b
...
@@ -674,8 +674,6 @@ static void nxagentSwitchDeferMode(void)
...
@@ -674,8 +674,6 @@ static void nxagentSwitchDeferMode(void)
}
}
}
}
static
Bool
autograb
=
False
;
static
void
nxagentEnableAutoGrab
(
void
)
static
void
nxagentEnableAutoGrab
(
void
)
{
{
#ifdef DEBUG
#ifdef DEBUG
...
@@ -683,7 +681,7 @@ static void nxagentEnableAutoGrab(void)
...
@@ -683,7 +681,7 @@ static void nxagentEnableAutoGrab(void)
#endif
#endif
nxagentGrabPointerAndKeyboard
(
NULL
);
nxagentGrabPointerAndKeyboard
(
NULL
);
autograb
=
True
;
nxagentChangeOption
(
AutoGrab
,
True
)
;
}
}
static
void
nxagentDisableAutoGrab
(
void
)
static
void
nxagentDisableAutoGrab
(
void
)
...
@@ -693,7 +691,7 @@ static void nxagentDisableAutoGrab(void)
...
@@ -693,7 +691,7 @@ static void nxagentDisableAutoGrab(void)
#endif
#endif
nxagentUngrabPointerAndKeyboard
(
NULL
);
nxagentUngrabPointerAndKeyboard
(
NULL
);
autograb
=
False
;
nxagentChangeOption
(
AutoGrab
,
False
)
;
}
}
static
void
nxagentToggleAutoGrab
(
void
)
static
void
nxagentToggleAutoGrab
(
void
)
...
@@ -702,7 +700,7 @@ static void nxagentToggleAutoGrab(void)
...
@@ -702,7 +700,7 @@ static void nxagentToggleAutoGrab(void)
if
(
nxagentOption
(
Rootless
)
||
nxagentOption
(
Fullscreen
))
if
(
nxagentOption
(
Rootless
)
||
nxagentOption
(
Fullscreen
))
return
;
return
;
if
(
!
autograb
)
if
(
!
nxagentOption
(
AutoGrab
)
)
nxagentEnableAutoGrab
();
nxagentEnableAutoGrab
();
else
else
nxagentDisableAutoGrab
();
nxagentDisableAutoGrab
();
...
@@ -1560,7 +1558,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was
...
@@ -1560,7 +1558,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was
}
}
/* FIXME: only when in windowed mode! */
/* FIXME: only when in windowed mode! */
if
(
autograb
)
if
(
nxagentOption
(
AutoGrab
)
)
{
{
if
(
X
.
xfocus
.
window
==
nxagentDefaultWindows
[
0
]
&&
X
.
xfocus
.
mode
==
NotifyNormal
)
if
(
X
.
xfocus
.
window
==
nxagentDefaultWindows
[
0
]
&&
X
.
xfocus
.
mode
==
NotifyNormal
)
{
{
...
@@ -1648,7 +1646,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was
...
@@ -1648,7 +1646,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was
#endif
/* NXAGENT_FIXKEYS */
#endif
/* NXAGENT_FIXKEYS */
if
(
autograb
)
if
(
nxagentOption
(
AutoGrab
)
)
{
{
XlibWindow
w
;
XlibWindow
w
;
int
revert_to
;
int
revert_to
;
...
...
nx-X11/programs/Xserver/hw/nxagent/Options.c
View file @
8bf3429b
...
@@ -172,6 +172,8 @@ void nxagentInitOptions(void)
...
@@ -172,6 +172,8 @@ void nxagentInitOptions(void)
nxagentOptions
.
ReconnectTolerance
=
DEFAULT_TOLERANCE
;
nxagentOptions
.
ReconnectTolerance
=
DEFAULT_TOLERANCE
;
nxagentOptions
.
KeycodeConversion
=
DEFAULT_KEYCODE_CONVERSION
;
nxagentOptions
.
KeycodeConversion
=
DEFAULT_KEYCODE_CONVERSION
;
nxagentOptions
.
AutoGrab
=
False
;
}
}
/*
/*
...
...
nx-X11/programs/Xserver/hw/nxagent/Options.h
View file @
8bf3429b
...
@@ -450,6 +450,13 @@ typedef struct _AgentOptions
...
@@ -450,6 +450,13 @@ typedef struct _AgentOptions
* Convert evdev keycodes to pc105.
* Convert evdev keycodes to pc105.
*/
*/
KeycodeConversionMode
KeycodeConversion
;
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
;
}
AgentOptionsRec
;
typedef
AgentOptionsRec
*
AgentOptionsPtr
;
typedef
AgentOptionsRec
*
AgentOptionsPtr
;
...
...
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