Bug 225171 - [PATCH] return focus to document after closing find bar with close button
Summary: [PATCH] return focus to document after closing find bar with close button
Status: RESOLVED NOT A BUG
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Unspecified
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-01 18:42 UTC by Will Stephenson
Modified: 2014-05-08 09:45 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
patch fixing the above (1.99 KB, patch)
2010-02-01 18:43 UTC, Will Stephenson
Details

Note You need to log in before you can comment on or make changes to this bug.
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