Restore ability to compile against kdelib4_snapshot

svn path=/trunk/KDE/kdebase/workspace/; revision=460303
This commit is contained in:
Shaheed Haque 2005-09-13 10:14:32 +00:00
parent e01631784e
commit 8d2e997ce3
2 changed files with 24 additions and 0 deletions

View file

@ -1065,9 +1065,17 @@ int qtToX11State( Qt::ButtonState state )
if( state & Qt::ControlButton )
ret |= ControlMask;
if( state & Qt::AltButton )
#ifdef QT3_SUPPORT
ret |= KKeyNative::modX(KKey::ALT);
#else
ret |= KKeyNative::modXAlt();
#endif
if( state & Qt::MetaButton )
#ifdef QT3_SUPPORT
ret |= KKeyNative::modX(KKey::WIN);
#else
ret |= KKeyNative::modXWin();
#endif
return ret;
}
@ -1133,8 +1141,13 @@ bool Client::buttonPressEvent( Window w, int button, int state, int x, int y, in
updateUserTime();
workspace()->setWasUserInteraction();
uint keyModX = (options->keyCmdAllModKey() == Qt::Key_Meta) ?
#ifdef QT3_SUPPORT
KKeyNative::modX(KKey::WIN) :
KKeyNative::modX(KKey::ALT);
#else
KKeyNative::modXWin() :
KKeyNative::modXAlt();
#endif
bool bModKeyHeld = keyModX != 0 && ( state & KKeyNative::accelModMaskX()) == keyModX;
if( isSplash()

View file

@ -724,7 +724,11 @@ void TabBox::updateKeyMapping()
int altpos = 0;
int winpos = 0;
int winmodpos = -1;
#ifdef QT3_SUPPORT
int winmod = KKeyNative::modX(KKey::WIN);
#else
int winmod = KKeyNative::modXWin();
#endif
while( winmod > 0 ) // get position of the set bit in winmod
{
winmod >>= 1;
@ -1057,10 +1061,17 @@ void Workspace::closeTabBox()
void Workspace::tabBoxKeyRelease( const XKeyEvent& ev )
{
unsigned int mk = ev.state &
#ifdef QT3_SUPPORT
(KKeyNative::modX(KKey::SHIFT) |
KKeyNative::modX(KKey::CTRL) |
KKeyNative::modX(KKey::ALT) |
KKeyNative::modX(KKey::WIN) );
#else
(KKeyNative::modXShift() |
KKeyNative::modXCtrl() |
KKeyNative::modXAlt() |
KKeyNative::modXWin() );
#endif
// ev.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: only one modifier is active and the currently released