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
3d8e85c4
Commit
3d8e85c4
authored
Nov 13, 2011
by
Reinhard Tartler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Imported nxcompshad-3.3.0-3.tar.gz
Summary: Imported nxcompshad-3.3.0-3.tar.gz Keywords: Imported nxcompshad-3.3.0-3.tar.gz into Git repository
parent
3b440466
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
16 deletions
+52
-16
CHANGELOG
nxcompshad/CHANGELOG
+5
-0
Shadow.cpp
nxcompshad/Shadow.cpp
+1
-2
X11.cpp
nxcompshad/X11.cpp
+46
-14
No files found.
nxcompshad/CHANGELOG
View file @
3d8e85c4
ChangeLog:
nxcompshad-3.3.0-3
- Fixed TR01G02158. Keymap initialization could be incorrect because
of a type mismatch on 64 bit platforms.
nxcompshad-3.3.0-2
- Updated VERSION.
...
...
nxcompshad/Shadow.cpp
View file @
3d8e85c4
...
...
@@ -466,6 +466,5 @@ void NXShadowInitKeymap(void *keysyms)
{
NXShadowKeymap
=
(
KeySymsPtr
)
keysyms
;
logTest
(
"NXShadowInitKeymap"
,
"KeySyms pointer [0x%p] mapWidth [%d]"
,
(
void
*
)
NXShadowKeymap
,
NXShadowKeymap
->
mapWidth
);
logTest
(
"NXShadowInitKeymap"
,
"KeySyms pointer [0x%p]"
,
(
void
*
)
NXShadowKeymap
);
}
nxcompshad/X11.cpp
View file @
3d8e85c4
...
...
@@ -23,6 +23,7 @@
#undef DEBUG
#include <X11/Xlibint.h>
#include <X11/Xproto.h>
#include <X11/extensions/XTest.h>
#include <X11/keysym.h>
#include <string.h>
...
...
@@ -59,6 +60,8 @@ static KeyPressedRec *shadowKeyPressedPtr = NULL;
static
KeySym
*
shadowKeysyms
=
NULL
;
static
KeySym
*
masterKeysyms
=
NULL
;
static
KeySym
*
shadowKeymap
=
NULL
;
static
int
shadowMinKey
,
shadowMaxKey
,
shadowMapWidth
;
static
int
masterMinKey
,
masterMaxKey
,
masterMapWidth
;
...
...
@@ -409,12 +412,35 @@ void Poller::shmInit(void)
void
Poller
::
keymapShadowInit
(
Display
*
display
)
{
if
(
NXShadowKeymap
)
int
i
,
len
;
CARD32
*
map
;
if
(
NXShadowKeymap
!=
NULL
)
{
shadowMinKey
=
NXShadowKeymap
->
minKeyCode
;
shadowMaxKey
=
NXShadowKeymap
->
maxKeyCode
;
shadowMinKey
=
NXShadowKeymap
->
minKeyCode
;
shadowMaxKey
=
NXShadowKeymap
->
maxKeyCode
;
shadowMapWidth
=
NXShadowKeymap
->
mapWidth
;
shadowKeysyms
=
NXShadowKeymap
->
map
;
len
=
(
shadowMaxKey
-
shadowMinKey
+
1
)
*
shadowMapWidth
;
map
=
(
CARD32
*
)
NXShadowKeymap
->
map
;
if
(
shadowKeymap
!=
NULL
)
{
free
(
shadowKeymap
);
}
shadowKeymap
=
(
KeySym
*
)
malloc
(
len
*
sizeof
(
KeySym
));
if
(
shadowKeymap
!=
NULL
)
{
for
(
i
=
0
;
i
<
len
;
i
++
)
{
shadowKeymap
[
i
]
=
map
[
i
];
}
shadowKeysyms
=
shadowKeymap
;
}
}
if
(
shadowKeysyms
==
NULL
)
...
...
@@ -426,13 +452,16 @@ void Poller::keymapShadowInit(Display *display)
}
#ifdef DEBUG
if
(
shadowKeysyms
)
if
(
shadowKeysyms
!=
NULL
)
{
for
(
i
nt
i
=
0
;
i
<
(
shadowMaxKey
-
shadowMinKey
)
*
shadowMapWidth
;
i
++
)
for
(
i
=
0
;
i
<
(
shadowMaxKey
-
shadowMinKey
+
1
)
*
shadowMapWidth
;
i
++
)
{
logDebug
(
"Poller::keymapShadowInit"
,
"keycode %d - keysym %x %s"
,
(
int
)(
i
/
shadowMapWidth
),
(
unsigned
int
)
shadowKeysyms
[
i
],
XKeysymToString
(
shadowKeysyms
[
i
]));
if
(
i
%
shadowMapWidth
==
0
)
{
logDebug
(
"Poller::keymapShadowInit"
,
"keycode [%d]"
,
(
int
)
(
i
/
shadowMapWidth
));
}
logDebug
(
"
\t
keysym"
,
" [%x] [%s]"
,
(
unsigned
int
)
shadowKeysyms
[
i
],
XKeysymToString
(
shadowKeysyms
[
i
]));
}
}
#endif
...
...
@@ -446,13 +475,16 @@ void Poller::keymapMasterInit()
&
masterMapWidth
);
#ifdef DEBUG
if
(
masterKeysyms
)
if
(
masterKeysyms
!=
NULL
)
{
for
(
int
i
=
0
;
i
<
(
masterMaxKey
-
masterMinKey
)
*
masterMapWidth
;
i
++
)
for
(
int
i
=
0
;
i
<
(
masterMaxKey
-
masterMinKey
+
1
)
*
masterMapWidth
;
i
++
)
{
logDebug
(
"Poller::keymapMasterInit"
,
"keycode %d - keysym %x %s"
,
(
int
)(
i
/
masterMapWidth
),
(
unsigned
int
)
masterKeysyms
[
i
],
XKeysymToString
(
masterKeysyms
[
i
]));
if
(
i
%
masterMapWidth
==
0
)
{
logDebug
(
"Poller::keymapMasterInit"
,
"keycode [%d]"
,
(
int
)
(
i
/
masterMapWidth
));
}
logDebug
(
"
\t
keysym"
,
" [%x] [%s]"
,
(
unsigned
int
)
masterKeysyms
[
i
],
XKeysymToString
(
masterKeysyms
[
i
]));
}
}
#endif
...
...
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