Update calls to deprecated XKeycodeToKeysym function

pull/2/head
Timothy Pearson 12 years ago
parent b5bb40fa89
commit 443169bdcb

@ -20,6 +20,7 @@
#include <X11/X.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/XKBlib.h>
#include <X11/keysymdef.h>
#include <ctype.h>
#undef NONE
@ -300,7 +301,7 @@ void ModifiersModule::updateWidgets()
for( int iMod = 0; iMod < 8; iMod++ ) {
// Find the default modifier index for the Win key.
/*if( iMod > Mod2Index ) {
uint symX = XKeycodeToKeysym( tqt_xdisplay(), xmk->modifiermap[xmk->max_keypermod * iMod], 0 );
uint symX = XkbKeycodeToKeysym( tqt_xdisplay(), xmk->modifiermap[xmk->max_keypermod * iMod], 0, 0 );
if( symX == XK_Super_L || symX == XK_Super_R )
iModWinDef = iMod;
else if( iModWinDef == -1 && (symX == XK_Meta_L || symX == XK_Meta_R) )
@ -309,7 +310,7 @@ void ModifiersModule::updateWidgets()
// Insert items into X modifier map list
for( int iKey = 0; iKey < xmk->max_keypermod; iKey++ ) {
uint symX = XKeycodeToKeysym( tqt_xdisplay(), xmk->modifiermap[xmk->max_keypermod * iMod + iKey], 0 );
uint symX = XkbKeycodeToKeysym( tqt_xdisplay(), xmk->modifiermap[xmk->max_keypermod * iMod + iKey], 0, 0 );
m_plstXMods->itemAtIndex( iMod )->setText( 1 + iKey, XKeysymToString( symX ) );
}
}

@ -15,6 +15,7 @@ License. See the file "COPYING" for the exact licensing terms.
#include "killwindow.h"
#include <tqcursor.h>
#include <X11/Xlib.h>
#include <X11/XKBlib.h>
#include <X11/keysym.h>
#include <X11/keysymdef.h>
#include <X11/cursorfont.h>
@ -61,7 +62,7 @@ void KillWindow::start()
if (ev.type == KeyPress)
{
int kc = XKeycodeToKeysym(tqt_xdisplay(), ev.xkey.keycode, 0);
int kc = XkbKeycodeToKeysym(tqt_xdisplay(), ev.xkey.keycode, 0, 0);
int mx = 0;
int my = 0;
return_pressed = (kc == XK_Return) || (kc == XK_space);

@ -40,6 +40,7 @@ License. See the file "COPYING" for the exact licensing terms.
#include "group.h"
#include "rules.h"
#include <X11/XKBlib.h>
#include <X11/extensions/shape.h>
#include <X11/keysym.h>
#include <X11/keysymdef.h>
@ -2180,7 +2181,7 @@ bool Workspace::keyPressMouseEmulation( XKeyEvent& ev )
{
if ( root != tqt_xrootwin() )
return FALSE;
int kc = XKeycodeToKeysym(tqt_xdisplay(), ev.keycode, 0);
int kc = XkbKeycodeToKeysym(tqt_xdisplay(), ev.keycode, 0, 0);
int km = ev.state & (ControlMask | Mod1Mask | ShiftMask);
bool is_control = km & ControlMask;

Loading…
Cancel
Save