Call string <=> key conversion functions in KKey & KKeyX11 instead of KAccel
svn path=/trunk/kdebase/kcontrol/; revision=115761
This commit is contained in:
parent
df1676cdfe
commit
0223deb116
3 changed files with 8 additions and 7 deletions
|
@ -25,7 +25,7 @@ Copyright (C) 1999, 2000 Matthias Ettrich <ettrich@kde.org>
|
|||
#include "client.h"
|
||||
#include "events.h"
|
||||
#include "atoms.h"
|
||||
#include <kaccel.h> // Needed in x11Event() below
|
||||
#include <kkey_x11.h> // Needed in x11Event() below
|
||||
#include <netwm.h>
|
||||
#include <X11/X.h>
|
||||
#include <X11/Xos.h>
|
||||
|
@ -405,7 +405,7 @@ bool WindowWrapper::x11Event( XEvent * e)
|
|||
case ButtonPress:
|
||||
{
|
||||
uint keyModX = (options->keyCmdAllModKey() == Qt::Key_Meta) ?
|
||||
KAccel::keyModXMeta() : KAccel::keyModXAlt();
|
||||
KKeyX11::keyModXMeta() : KKeyX11::keyModXAlt();
|
||||
bool bModKeyHeld = e->xbutton.state & keyModX;
|
||||
|
||||
if ( ((Client*)parentWidget())->isActive()
|
||||
|
|
|
@ -10,7 +10,7 @@ Copyright (C) 1999, 2000 Matthias Ettrich <ettrich@kde.org>
|
|||
#include <kconfig.h>
|
||||
#include <kglobal.h>
|
||||
#include <kglobalsettings.h>
|
||||
#include <kaccel.h> // for KAccel::keyboardHasMetaKey()
|
||||
#include <kkey.h> // for KKeyX11::keyboardHasMetaKey()
|
||||
|
||||
using namespace KWinInternal;
|
||||
|
||||
|
@ -247,7 +247,7 @@ void Options::reload()
|
|||
CmdWindow1 = mouseCommand(config->readEntry("CommandWindow1","Activate, raise and pass click"));
|
||||
CmdWindow2 = mouseCommand(config->readEntry("CommandWindow2","Activate and pass click"));
|
||||
CmdWindow3 = mouseCommand(config->readEntry("CommandWindow3","Activate and pass click"));
|
||||
CmdAllModKey = (config->readEntry("CommandAllKey", KAccel::keyboardHasMetaKey() ? "Meta" : "Alt") == "Meta") ? Qt::Key_Meta : Qt::Key_Alt;
|
||||
CmdAllModKey = (config->readEntry("CommandAllKey", KKey::keyboardHasMetaKey() ? "Meta" : "Alt") == "Meta") ? Qt::Key_Meta : Qt::Key_Alt;
|
||||
CmdAll1 = mouseCommand(config->readEntry("CommandAll1","Move"));
|
||||
CmdAll2 = mouseCommand(config->readEntry("CommandAll2","Toggle raise and lower"));
|
||||
CmdAll3 = mouseCommand(config->readEntry("CommandAll3","Resize"));
|
||||
|
|
|
@ -28,6 +28,7 @@ Copyright (C) 1999, 2000 Matthias Ettrich <ettrich@kde.org>
|
|||
#else
|
||||
#include <qdesktopwidget.h>
|
||||
#endif
|
||||
#include <kkey_x11.h>
|
||||
#include "workspace.h"
|
||||
#include "client.h"
|
||||
#include "tabbox.h"
|
||||
|
@ -1057,7 +1058,7 @@ bool Workspace::keyPress(XKeyEvent key)
|
|||
if ( root != qt_xrootwin() )
|
||||
return FALSE;
|
||||
|
||||
uint keyCombQt = KAccel::keyEventXToKeyQt( (XEvent*)&key );
|
||||
uint keyCombQt = KKeyX11::keyEventXToKeyQt( (XEvent*)&key );
|
||||
if (d->movingClient)
|
||||
{
|
||||
d->movingClient->keyPressEvent(keyCombQt);
|
||||
|
@ -1113,7 +1114,7 @@ bool Workspace::keyRelease(XKeyEvent key)
|
|||
return FALSE;
|
||||
if( !tab_grab && !control_grab )
|
||||
return FALSE;
|
||||
unsigned int mk = key.state & KAccel::accelModMaskX();
|
||||
unsigned int mk = key.state & KKeyX11::accelModMaskX();
|
||||
// key.state is state before the key release, so just checking mk being 0 isn't enough
|
||||
// using XQueryPointer() also doesn't seem to work well, so the check that all
|
||||
// modifiers are released is : only one modifier is active and the currently released
|
||||
|
@ -1547,7 +1548,7 @@ QPopupMenu* Workspace::clientPopup( Client* c )
|
|||
|
||||
popup->insertSeparator();
|
||||
|
||||
QString k = KAccel::keyToString( keys->currentKey( "Window close" ), true );
|
||||
QString k = KKey::keyToString( keys->currentKey( "Window close" ), true );
|
||||
popup->insertItem( SmallIconSet( "remove" ), i18n("&Close")+'\t'+k, Options::CloseOp );
|
||||
}
|
||||
return popup;
|
||||
|
|
Loading…
Reference in a new issue