From 0223deb1162ed4d9042fded78149a3ae699735f0 Mon Sep 17 00:00:00 2001 From: Ellis Whitehead Date: Fri, 28 Sep 2001 12:31:48 +0000 Subject: [PATCH] Call string <=> key conversion functions in KKey & KKeyX11 instead of KAccel svn path=/trunk/kdebase/kcontrol/; revision=115761 --- client.cpp | 4 ++-- options.cpp | 4 ++-- workspace.cpp | 7 ++++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/client.cpp b/client.cpp index c85883fa5e..7638073a33 100644 --- a/client.cpp +++ b/client.cpp @@ -25,7 +25,7 @@ Copyright (C) 1999, 2000 Matthias Ettrich #include "client.h" #include "events.h" #include "atoms.h" -#include // Needed in x11Event() below +#include // Needed in x11Event() below #include #include #include @@ -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() diff --git a/options.cpp b/options.cpp index a82a44deb4..1a9a407df5 100644 --- a/options.cpp +++ b/options.cpp @@ -10,7 +10,7 @@ Copyright (C) 1999, 2000 Matthias Ettrich #include #include #include -#include // for KAccel::keyboardHasMetaKey() +#include // 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")); diff --git a/workspace.cpp b/workspace.cpp index 3a4b1f5cf7..e81403e7ef 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -28,6 +28,7 @@ Copyright (C) 1999, 2000 Matthias Ettrich #else #include #endif +#include #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;