Bug 225171

Summary: [PATCH] return focus to document after closing find bar with close button
Product: [Applications] okular Reporter: Will Stephenson <wstephenson>
Component: generalAssignee: Okular developers <okular-devel>
Status: RESOLVED NOT A BUG    
Severity: normal CC: aacid
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Unspecified   
Latest Commit: Version Fixed In:
Attachments: patch fixing the above

Description Will Stephenson 2010-02-01 18:42:21 UTC
Version:            (using Devel)
Installed from:    Compiled sources

There are two different close paths for closing the find bar via a QAction, and via the button embedded in the bar.  The action variant restores focus to the document, but the button does not because it just calls QWidget::close() internally to the bar.  This patch makes the bar request that it is hidden when the button is clicked, using the same controller logic in the part, which can then set focus on the document  

This has the effect of also preventing the bar closing if maybeClose() returns false during a running search, which is the same way the action is handled.
Comment 1 Will Stephenson 2010-02-01 18:43:50 UTC
Created attachment 40440 [details]
patch fixing the above
Comment 2 Will Stephenson 2010-02-01 18:50:27 UTC
BTW the same solution might work for 213508 but I couldn't figure out exactly how to reproduce the bug to check.
Comment 3 Albert Astals Cid 2010-02-01 23:28:50 UTC
The bar has to be closed if the button is pressed, that's why the tooltip says "Close", so the patch needs to be changed.
Comment 4 Albert Astals Cid 2013-03-10 22:10:39 UTC
Will, waiting for your updated patch. Also using reviewboard would be a better idea to be honest
Comment 5 Albert Astals Cid 2014-05-08 09:45:27 UTC
No answer in more than 6 months