summaryrefslogtreecommitdiffstats
path: root/tdeui
diff options
context:
space:
mode:
Diffstat (limited to 'tdeui')
-rw-r--r--tdeui/tdeshortcutdialog.cpp23
-rw-r--r--tdeui/tdeshortcutdialog.h1
2 files changed, 10 insertions, 14 deletions
diff --git a/tdeui/tdeshortcutdialog.cpp b/tdeui/tdeshortcutdialog.cpp
index 35a7706c7..4d95970b6 100644
--- a/tdeui/tdeshortcutdialog.cpp
+++ b/tdeui/tdeshortcutdialog.cpp
@@ -82,7 +82,6 @@ TDEShortcutDialog::TDEShortcutDialog( const TDEShortcut& shortcut, bool bQtShort
m_bQtShortcut = bQtShortcut;
- m_bGrab = false;
m_iSeq = 0;
m_iKey = 0;
m_ptxtCurrent = 0;
@@ -291,22 +290,20 @@ bool TDEShortcutDialog::x11Event( XEvent *pEvent )
x11KeyReleaseEvent( pEvent );
return true;
case XFocusIn:
- if (!m_bGrab) {
- //kdDebug(125) << "FocusIn and Grab!" << endl;
- grabKeyboard();
- m_bGrab = true;
+ {
+ XFocusInEvent *fie = (XFocusInEvent*)pEvent;
+ if (fie->mode != NotifyGrab && fie->mode != NotifyUngrab) {
+ grabKeyboard();
+ }
}
- //else
- // kdDebug(125) << "FocusIn" << endl;
break;
case XFocusOut:
- if (m_bGrab) {
- //kdDebug(125) << "FocusOut and Ungrab!" << endl;
- releaseKeyboard();
- m_bGrab = false;
+ {
+ XFocusOutEvent *foe = (XFocusOutEvent*)pEvent;
+ if (foe->mode != NotifyGrab && foe->mode != NotifyUngrab) {
+ releaseKeyboard();
+ }
}
- //else
- // kdDebug(125) << "FocusOut" << endl;
break;
default:
//kdDebug(125) << "x11Event->type = " << pEvent->type << endl;
diff --git a/tdeui/tdeshortcutdialog.h b/tdeui/tdeshortcutdialog.h
index c0b8fa49b..afad6fda2 100644
--- a/tdeui/tdeshortcutdialog.h
+++ b/tdeui/tdeshortcutdialog.h
@@ -53,7 +53,6 @@ private:
bool m_bQtShortcut;
TDEShortcut m_shortcut;
- bool m_bGrab;
KPushButton* m_ptxtCurrent;
uint m_iSeq;
uint m_iKey;