Bug 266894

Summary: KKeySequenceWidget: Stop recording when focus is lost.
Product: [Frameworks and Libraries] frameworks-kxmlgui Reporter: David Korth <gerbilsoft>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs-null>
Status: REPORTED ---    
Severity: wishlist    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: KKeySequenceWidget: Cancel recording if focus is lost.
KKeySequenceWidget: Cancel recording if focus is lost. (#2)

Description David Korth 2011-02-22 16:19:58 UTC
Created attachment 57446 [details]
KKeySequenceWidget: Cancel recording if focus is lost.

Version:           4.6 (using KDE 4.6.0) 
OS:                Linux

Currently, KKeySequenceWidget only stops recording if either a key sequence is entered or the timeout expires. If a KKeySequenceButton is clicked and then another window is focused, the KKeySequenceWidget will keep recording the sequence, even though it doesn't have focus.

The attached patch cancels the recording if the KKeySequenceButton loses focus.

Reproducible: Always

Steps to Reproduce:
1. Click a KKeySequenceButton within a KKeySequenceWidget.
2. Move input focus to another window.
3. Press a key sequence.

Actual Results:  
The KKeySequenceButton captures the key sequence.

Expected Results:  
The KKeySequenceButton should ignore the key sequence.
Comment 1 David Korth 2011-02-22 16:21:09 UTC
Created attachment 57447 [details]
KKeySequenceWidget: Cancel recording if focus is lost. (#2)

Same patch, but without the backup files listed.