summaryrefslogtreecommitdiffstats
path: root/kolourpaint/kptool.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kolourpaint/kptool.cpp')
-rw-r--r--kolourpaint/kptool.cpp22
1 files changed, 8 insertions, 14 deletions
diff --git a/kolourpaint/kptool.cpp b/kolourpaint/kptool.cpp
index fea1cf58..0327f8be 100644
--- a/kolourpaint/kptool.cpp
+++ b/kolourpaint/kptool.cpp
@@ -499,14 +499,11 @@ void kpTool::beginInternal ()
m_beganDraw = false;
- uint keyState = TDEApplication::keyboardModifiers ();
+ TQt::ButtonState keyState = TDEApplication::keyboardMouseState ();
- m_shiftPressed = (keyState & TDEApplication::ShiftModifier);
- m_controlPressed = (keyState & TDEApplication::ControlModifier);
-
- // TODO: Can't do much about ALT - unless it's always TDEApplication::Modifier1?
- // Ditto for everywhere else where I set SHIFT & CTRL but not alt.
- m_altPressed = false;
+ m_shiftPressed = (keyState & TQt::ShiftButton);
+ m_controlPressed = (keyState & TQt::ControlButton);
+ m_altPressed = (keyState & TQt::AltButton);
}
}
@@ -1372,14 +1369,11 @@ void kpTool::keyUpdateModifierState (TQKeyEvent *e)
#if DEBUG_KP_TOOL && 0
kdDebug () << "\t\tmodifiers not changed - figure out the truth" << endl;
#endif
- uint keyState = TDEApplication::keyboardModifiers ();
-
- setShiftPressed (keyState & TDEApplication::ShiftModifier);
- setControlPressed (keyState & TDEApplication::ControlModifier);
+ TQt::ButtonState keyState = TDEApplication::keyboardMouseState ();
- // TODO: Can't do much about ALT - unless it's always TDEApplication::Modifier1?
- // Ditto for everywhere else where I set SHIFT & CTRL but not alt.
- setAltPressed (e->stateAfter () & TQt::AltButton);
+ setShiftPressed (keyState & TQt::ShiftButton);
+ setControlPressed (keyState & TQt::ControlButton);
+ setAltPressed ( keyState & TQt::AltButton);
}
}