From 67f830d22354cc6a2d6582809b56247a6be7e427 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Sun, 15 Apr 2007 14:56:38 +0000 Subject: [PATCH] Use symbolic name for keyboard modifiers mask instead of hardcoded and wrong value. svn path=/branches/work/kwin_composite/; revision=654234 --- events.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/events.cpp b/events.cpp index ca56b4c60a..dff66e832a 100644 --- a/events.cpp +++ b/events.cpp @@ -1561,31 +1561,31 @@ void Client::keyPressEvent( uint key_code ) return; bool is_control = key_code & Qt::CTRL; bool is_alt = key_code & Qt::ALT; - key_code = key_code & 0xffff; + key_code = key_code & ~Qt::KeyboardModifierMask; int delta = is_control?1:is_alt?32:8; QPoint pos = cursorPos(); switch ( key_code ) { - case Qt::Key_Left: + case Qt::Key_Left: pos.rx() -= delta; break; - case Qt::Key_Right: + case Qt::Key_Right: pos.rx() += delta; break; - case Qt::Key_Up: + case Qt::Key_Up: pos.ry() -= delta; break; - case Qt::Key_Down: + case Qt::Key_Down: pos.ry() += delta; break; - case Qt::Key_Space: - case Qt::Key_Return: - case Qt::Key_Enter: + case Qt::Key_Space: + case Qt::Key_Return: + case Qt::Key_Enter: finishMoveResize( false ); buttonDown = false; setCursor( mode ); break; - case Qt::Key_Escape: + case Qt::Key_Escape: finishMoveResize( true ); buttonDown = false; setCursor( mode );