Skip to content

Commit

Permalink
nxagent: replace deprecated function call XKeycodeToKeysym
Browse files Browse the repository at this point in the history
Keystroke.c: In function ‘nxagentCheckSpecialKeystroke’:
Keystroke.c:449:3: warning: ‘XKeycodeToKeysym’ is deprecated (declared at ../../../../exports/include/nx-X11/Xlib.h:1688) [-Wdeprecated-declarations]
   sym = XKeycodeToKeysym(nxagentDisplay, X -> keycode, index);

Fixes ArcticaProject#229
  • Loading branch information
uli42 committed Oct 15, 2016
1 parent 03a84a5 commit b7e1d6f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nx-X11/programs/Xserver/hw/nxagent/Events.c
Original file line number Diff line number Diff line change
Expand Up @@ -1101,7 +1101,7 @@ void nxagentDispatchEvents(PredicateFuncPtr predicate)
* sive delay.
*/

keysym = XKeycodeToKeysym(nxagentDisplay, X.xkey.keycode, 0);
keysym = XkbKeycodeToKeysym(nxagentDisplay, X.xkey.keycode, 0, 0);

if (nxagentMonitoredDuplicate(keysym) == 1)
{
Expand Down
6 changes: 4 additions & 2 deletions nx-X11/programs/Xserver/hw/nxagent/Keystroke.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
#include <libxml/parser.h>
#include <libxml/tree.h>

#include <nx-X11/XKBlib.h>

extern Bool nxagentWMIsRunning;
extern Bool nxagentIpaq;
extern char *nxagentKeystrokeFile;
Expand Down Expand Up @@ -407,6 +409,7 @@ free(filename);
static enum nxagentSpecialKeystroke find_keystroke(XKeyEvent *X)
{
KeySym keysym = XKeycodeToKeysym(nxagentDisplay, X->keycode, 0);
KeySym keysym = XkbKeycodeToKeysym(nxagentDisplay,X->keycode, 0, 0);
struct nxagentSpecialKeystrokeMap *cur = map;

if (! nxagentKeystrokeFileParsed)
Expand All @@ -430,7 +433,6 @@ static enum nxagentSpecialKeystroke find_keystroke(XKeyEvent *X)
int nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result)
{
KeySym sym;
int index = 0;
enum nxagentSpecialKeystroke stroke = find_keystroke(X);

*result = doNothing;
Expand All @@ -440,7 +442,7 @@ int nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result)
* Do we need a cache ?
*/

sym = XKeycodeToKeysym(nxagentDisplay, X -> keycode, index);
sym = XkbKeycodeToKeysym(nxagentDisplay, X->keycode, 0, 0);

if (sym == XK_VoidSymbol || sym == NoSymbol)
{
Expand Down

0 comments on commit b7e1d6f

Please sign in to comment.