diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-04-29 00:23:20 +0900 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2021-02-03 21:52:18 +0100 |
commit | df6c90134707ff6f575537214148439c01235bc7 (patch) | |
tree | e28956882d93df138c512b34d711a85d83026578 | |
parent | a860d82befee0002aecf6b0219afef9c741eb522 (diff) | |
download | tdelibs-df6c90134707ff6f575537214148439c01235bc7.tar.gz tdelibs-df6c90134707ff6f575537214148439c01235bc7.zip |
Fixed unresponsive behavior of the shortcut setting dialog in recent
ditros. This resolves bug 2955.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 8ea3d4dd872623721abe3153cdd44d01e3cc69be)
-rw-r--r-- | kdeui/kshortcutdialog.cpp | 23 | ||||
-rw-r--r-- | kdeui/kshortcutdialog.h | 1 |
2 files changed, 10 insertions, 14 deletions
diff --git a/kdeui/kshortcutdialog.cpp b/kdeui/kshortcutdialog.cpp index 27d721626..2f3fd8b04 100644 --- a/kdeui/kshortcutdialog.cpp +++ b/kdeui/kshortcutdialog.cpp @@ -82,7 +82,6 @@ KShortcutDialog::KShortcutDialog( const KShortcut& shortcut, bool bQtShortcut, T m_bQtShortcut = bQtShortcut; - m_bGrab = false; m_iSeq = 0; m_iKey = 0; m_ptxtCurrent = 0; @@ -291,22 +290,20 @@ bool KShortcutDialog::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/kdeui/kshortcutdialog.h b/kdeui/kshortcutdialog.h index d843f6fb0..7c2c7f84b 100644 --- a/kdeui/kshortcutdialog.h +++ b/kdeui/kshortcutdialog.h @@ -53,7 +53,6 @@ private: bool m_bQtShortcut; KShortcut m_shortcut; - bool m_bGrab; KPushButton* m_ptxtCurrent; uint m_iSeq; uint m_iKey; |