Bug 315538 - okular --unique *does* raise its existing window
Summary: okular --unique *does* raise its existing window
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 0.16.60
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-20 20:06 UTC by Thomas Weißschuh
Modified: 2013-03-09 15:35 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Weißschuh 2013-02-20 20:06:37 UTC
When controlling an existing instance of okular with okular --remote the exising instance will become the focused window. This has been requested in bugreport 304526.
As there are usecases for both behaviours a config option or a commandline switch to okular --unique would be nice to have.

Usecase:
When using okular as previewer for synctex and forward search is triggered via an editor shortcut, okular claims focus which is taken from the editor.

Thanks in advance!

Reproducible: Always

Steps to Reproduce:
1. Start okular with "okular --unique"
2. Call "okular --unique <some_file>.pdf" from a terminal
Actual Results:  
The okular window gains focus.

Expected Results:  
The terminal from which the second call was made keeps its focus.

Happens on 0.16.0 and 27c37c1fd1b87e
Comment 1 Albert Astals Cid 2013-02-20 22:19:41 UTC
You are asking me to revert what we did because someone asked me to do what i did.

How do we solve this?

A --noraise param?
Comment 2 Thomas Weißschuh 2013-02-21 07:58:47 UTC
I certainly do not want you to plain revert it.
After all there is a usecase for the current behaviour.
I only wanted to make you aware of a usecase for the behaviour before the change.

A --noraise param would be perfect.
Comment 3 Albert Astals Cid 2013-03-09 15:35:45 UTC
Git commit 618e320a77106a96cf11fb59d1cec7b303aa177b by Albert Astals Cid, on behalf of Tomáš Poledný.
Committed on 09/03/2013 at 16:34.
Pushed by aacid into branch 'master'.

Add command line argument noraise

This path add new command line argument noraise. Window will not be raised with argument noraise.

I tried:
okular
okular -noraise
okular -noraise file_exist.pdf
okular -noraise file_not_exist
okular https://bugs.freedesktop.org/attachment.cgi?id=46889 --noraise
okular https://nonexisturl --noraise
okular -unique -noraise file_exist.pdf
okular -unique -noraise file_exist.pdf && okular -unique file_exist2.pdf
okular -unique -noraise file_exist.pdf file_exist2.pdf
okular -unique file.pdf && okular -unique -noraise file2.pdf
okular -unique -noraise file.pdf && okular -unique file2.pdf
REVIEW: 109363
FIXED-IN: 4.11.0

M  +4    -1    shell/main.cpp
M  +5    -0    shell/shell.cpp

http://commits.kde.org/okular/618e320a77106a96cf11fb59d1cec7b303aa177b