summaryrefslogtreecommitdiffstats
path: root/tdeui/tdeshortcutdialog.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2020-04-29 00:23:20 +0900
committerMichele Calgaro <[email protected]>2020-04-29 00:23:20 +0900
commit8ea3d4dd872623721abe3153cdd44d01e3cc69be (patch)
treeee71ee1da6ee2da186d8a18d9c775b179a066789 /tdeui/tdeshortcutdialog.cpp
parenta57ae64c11314ae571bd529c78c2460daccc9004 (diff)
downloadtdelibs-8ea3d4dd872623721abe3153cdd44d01e3cc69be.tar.gz
tdelibs-8ea3d4dd872623721abe3153cdd44d01e3cc69be.zip
Fixed unresponsive behavior of the shortcut setting dialog in recent
ditros. This resolves bug 2955. Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'tdeui/tdeshortcutdialog.cpp')
-rw-r--r--tdeui/tdeshortcutdialog.cpp23
1 files changed, 10 insertions, 13 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;