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
61d0fbea
Commit
61d0fbea
authored
Jun 13, 2016
by
Mike Gabriel
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'Ionic-bugfix/Xserver-Xlib-type-mismatch' into 3.6.x
Attributes GH PR #126:
https://github.com/ArcticaProject/nx-libs/pull/126
parents
35613d1d
639a2c36
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
1 deletion
+21
-1
Handlers.c
nx-X11/programs/Xserver/hw/nxagent/Handlers.c
+21
-1
No files found.
nx-X11/programs/Xserver/hw/nxagent/Handlers.c
View file @
61d0fbea
...
...
@@ -32,7 +32,10 @@
#include "Screen.h"
#include "Millis.h"
#define Window XlibWindow
#include <nx/NXlib.h>
#undef Window
#include <nx/Shadow.h>
/*
...
...
@@ -956,7 +959,24 @@ void nxagentShadowWakeupHandler(void * data, int count, void * mask)
void
nxagentHandleCollectInputFocusEvent
(
int
resource
)
{
Window
window
;
/*
* While we don't even need window or revert_to later on, a discrepancy in
* data type sizes between the X server (Window being a 32bit ID) and
* the Xlib (Window being a 64bit ID) will lead to stack corruption here.
* Calling functions from nxcompext from nxagent sounds like a very bad idea
* to begin with, but let's assume that's necessary for now and work around
* the corruption issue.
*
* Even though the NXlib header shows that the function expects a Window-sized
* parameter, it's not the Window type as defined and used within the X.Org
* Server, but an Xlib type. Hence, we'll be using the "XlibWindow" type here
* and to avoid compiler warnings, "rewrite" the NXlib.h header file via
* overriding the original "Window" type with the XlibWindow type, including
* the header file and undefining the macro again, essentially unshadowing
* the original type.
*/
XlibWindow
window
;
int
revert_to
;
if
(
NXGetCollectedInputFocus
(
nxagentDisplay
,
resource
,
&
window
,
&
revert_to
)
==
0
)
...
...
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