Bug 304526 - okular --unique does not raise its existing window
Summary: okular --unique does not raise its existing window
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 0.14.3
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2012-08-03 23:16 UTC by Sergei Ivanov
Modified: 2012-08-21 22:42 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.10.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergei Ivanov 2012-08-03 23:16:22 UTC
When okular is started with "--unique" and an instance is already running, its window is not raised. I was hit by this problem when I tried to use okular as an external PDF viewer in kile.


Reproducible: Always

Steps to Reproduce:
1. In a terminal, run 'okular --unique somefile.pdf &'
2. Make sure the okular window overlaps with the terminal one.
3. Raise the terminal window (or any other that overlaps with okular's).
4. Run 'okular --unique somefile.pdf &' again

Actual Results:  
On the second run, the existing okular window gets redrawn but is not raised. It stays below the  terminal window. This happens even when 'Focus stealing prevention level' in kwin configuration is set to 'None'.


Expected Results:  
The window should be raised. Every other program with 'one window' functionality does this.

Okular always had this problem (in KDE3 days too). I did not report it back then just because I had no use for the "--unique" option until recently.
Comment 1 Albert Astals Cid 2012-08-09 22:54:10 UTC
I will have a look "soon"
Comment 2 Albert Astals Cid 2012-08-21 22:42:05 UTC
Git commit 09067debaf933c2f9b4ea0a7c701e699fe62126e by Albert Astals Cid.
Committed on 22/08/2012 at 00:41.
Pushed by aacid into branch 'master'.

Make --unique also raise the window
FIXED-IN: 4.10.0

M  +3    -1    shell/main.cpp
M  +14   -2    shell/shell.cpp
M  +6    -0    shell/shell.h

http://commits.kde.org/okular/09067debaf933c2f9b4ea0a7c701e699fe62126e