Bug 224860

Summary: Don't move the mouse on inverse search
Product: [Applications] okular Reporter: Martin Geisler <mg>
Component: generalAssignee: Okular developers <okular-devel>
Status: RESOLVED NOT A BUG    
Severity: wishlist CC: Jochen.Trumpf
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Martin Geisler 2010-01-30 12:22:49 UTC
Version:            (using KDE 4.3.4)
OS:                Linux
Installed from:    Debian testing/unstable Packages

I would prefer if my mouse stayed where it is when I use shift + button 1 to do an inverse search in a DVI file. Right now, I moves to the top-right corner of my Emacs.

I guess this is done to accomodate people who use a focus-follows-mouse focus model? In any case, it would be great to have a setting for this.
Comment 1 Jochen Trumpf 2010-01-30 22:05:25 UTC
This is unlikely to be okular's fault. All okular does in this situation is to call 

emacsclient -a emacs --no-wait +<linenumber> <filename>

On my machine the cursor stays where it is after that call. If it moves to emacs on your setup, this is more likely an issue with focus stealing. These issues can be hard to resolve, in particular since emacs has a gtk interface and is not based on a KDE application container. You could try and experiment with KDE's focus stealing prevention settings. Otherwise you should check your emacs settings to see if there is anything asking it to acquire focus.
Comment 2 Martin Geisler 2010-01-30 22:29:13 UTC
Oh, you're right! It is Emacs fault... I'm amazed I never realized this before, since I'm using emacsclient as by EDITOR environment variable.

I'll go hunt for a setting in Emacs now... Thanks for the quick response and sorry for the bother :-)

I've marked this bug "invalid", I hope that's the correct status setting.
Comment 3 Martin Geisler 2010-01-30 22:36:53 UTC
That was easy -- (setq focus-follows-mouse nil) informs Emacs that it does not need to meddle with my mouse :-)