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
6181aa91
Commit
6181aa91
authored
Aug 14, 2019
by
Ulrich Sibiller
Committed by
Mike Gabriel
Aug 27, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Events.c: introduce separate debug level for autograb debugging only
We should do something similar for all subsystems over time...
parent
063813d3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
7 deletions
+16
-7
Events.c
nx-X11/programs/Xserver/hw/nxagent/Events.c
+16
-7
No files found.
nx-X11/programs/Xserver/hw/nxagent/Events.c
View file @
6181aa91
...
@@ -115,6 +115,15 @@
...
@@ -115,6 +115,15 @@
#undef TEST
#undef TEST
#undef DEBUG
#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.
* Log begin and end of the important handlers.
*/
*/
...
@@ -706,9 +715,9 @@ static void nxagentSwitchDeferMode(void)
...
@@ -706,9 +715,9 @@ static void nxagentSwitchDeferMode(void)
static
void
nxagentEnableAutoGrab
(
void
)
static
void
nxagentEnableAutoGrab
(
void
)
{
{
#ifdef DEBUG
#ifdef DEBUG_AUTOGRAB
fprintf
(
stderr
,
"enabling autograb
\n
"
);
fprintf
(
stderr
,
"enabling autograb
\n
"
);
#endif
#endif
nxagentGrabPointerAndKeyboard
(
NULL
);
nxagentGrabPointerAndKeyboard
(
NULL
);
nxagentChangeOption
(
AutoGrab
,
True
);
nxagentChangeOption
(
AutoGrab
,
True
);
...
@@ -717,9 +726,9 @@ static void nxagentEnableAutoGrab(void)
...
@@ -717,9 +726,9 @@ static void nxagentEnableAutoGrab(void)
static
void
nxagentDisableAutoGrab
(
void
)
static
void
nxagentDisableAutoGrab
(
void
)
{
{
#ifdef DEBUG
#ifdef DEBUG_AUTOGRAB
fprintf
(
stderr
,
"disabling autograb
\n
"
);
fprintf
(
stderr
,
"disabling autograb
\n
"
);
#endif
#endif
nxagentUngrabPointerAndKeyboard
(
NULL
);
nxagentUngrabPointerAndKeyboard
(
NULL
);
nxagentChangeOption
(
AutoGrab
,
False
);
nxagentChangeOption
(
AutoGrab
,
False
);
...
@@ -1603,14 +1612,14 @@ FIXME: Don't enqueue the KeyRelease event if the key was
...
@@ -1603,14 +1612,14 @@ FIXME: Don't enqueue the KeyRelease event if the key was
{
{
if
(
X
.
xfocus
.
window
==
nxagentDefaultWindows
[
0
]
&&
X
.
xfocus
.
mode
==
NotifyNormal
)
if
(
X
.
xfocus
.
window
==
nxagentDefaultWindows
[
0
]
&&
X
.
xfocus
.
mode
==
NotifyNormal
)
{
{
#if
def DEBUG
#if
defined(DEBUG) || defined(DEBUG_AUTOGRAB)
fprintf
(
stderr
,
"%s: (FocusIn): grabbing
\n
"
,
__func__
);
fprintf
(
stderr
,
"%s: (FocusIn): grabbing
\n
"
,
__func__
);
#endif
#endif
nxagentGrabPointerAndKeyboard
(
NULL
);
nxagentGrabPointerAndKeyboard
(
NULL
);
}
}
/* else
/* else
{
{
#if
def DEBUG
#if
defined(DEBUG) || defined(DEBUG_AUTOGRAB)
fprintf(stderr, "%s: (FocusIn): ungrabbing\n", __func__);
fprintf(stderr, "%s: (FocusIn): ungrabbing\n", __func__);
#endif
#endif
nxagentUngrabPointerAndKeyboard(NULL);
nxagentUngrabPointerAndKeyboard(NULL);
...
@@ -1706,7 +1715,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was
...
@@ -1706,7 +1715,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was
XGetInputFocus
(
nxagentDisplay
,
&
w
,
&
revert_to
);
XGetInputFocus
(
nxagentDisplay
,
&
w
,
&
revert_to
);
if
(
w
!=
nxagentDefaultWindows
[
0
]
&&
X
.
xfocus
.
mode
==
NotifyWhileGrabbed
)
if
(
w
!=
nxagentDefaultWindows
[
0
]
&&
X
.
xfocus
.
mode
==
NotifyWhileGrabbed
)
{
{
#if
def DEBUG
#if
defined(DEBUG) || defined(DEBUG_AUTOGRAB)
fprintf
(
stderr
,
"%s: (FocusOut): ungrabbing
\n
"
,
__func__
);
fprintf
(
stderr
,
"%s: (FocusOut): ungrabbing
\n
"
,
__func__
);
#endif
#endif
nxagentUngrabPointerAndKeyboard
(
NULL
);
nxagentUngrabPointerAndKeyboard
(
NULL
);
...
...
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