firefox -new-tab steals X11 focus as of 13.0
When I use "firefox -new-tab anyurl.com" it steals input focus despite leaving the mouse pointer in the xterm I typed this in.
It did not do this in 12.0 or any version I've known before.
Interestingly google-chrome has done this for some time. So it could be that firefox has started using some similar X11 based libs (gnome/gtk/3d based?) perhaps to speed up acceleration.
The window manager I use is wmx but this also happens on evilwm, twm and probably many others that can be used with follow-to-focus.
I suspect that this change is actually intentional, catering for some Unity feature or something like that, however I couldn't see any flag to firefox for suppressing it and I find it extremely upsetting to now find Firefox doing what Chrome does with my mouse/keyboard focus.
Semua Balasan (1)
This script was adapted for my workaround for chrome's lameness, now needed on Firefox. This is very brittle, it sort of works a lot of the time but it's not a proper solution.
For some reason the hashes at the start of each line to comment or make up the pling path turn into numbers in this edit box. But you get the idea
- !/bin/sh
- This lame kludge is necessary because firefox now plays sillybuggers with
- my window manager. I've also tried several times but failed to get
- xdotool to work exactly how I want, so I have to run it 4 times!
- It's pretty self documenting, but I've added a few notes
- 1st store details of what state stuff is in.
eval $(xdotool getmouselocation --shell 2>/dev/null )
- This doesn't set the window to be the focused terminal, but I need X and Y
export X Y
export WINDOWID=$(xdotool getwindowfocus -f 2>/dev/null )
- echo $WINDOWID $X $Y
- Do the actual opening of new tab on $1. This used to work fine in firefox and only
- did this in chrome until ff13.0
(firefox $1 >/dev/null) & 2>/dev/null
- Focus and fill out the previously focused window, I had issues with xdotool
- not working as expected when bouncing the mouse around.
sleep .2
xdotool mousemove -sync --window $WINDOWID 0 0 2>/dev/null
- I added both --sync and sleep .2 but not sure which helped the most
xdotool mousemove 0 0 mousemove restore mousemove $X $Y 2>/dev/null
- The above mess is because I want the window border filled out. I could just
- focus the window and have the pointer restored to where it was.
- The following is for the rare times firefox* is slow and I don't gain focus
- They'll need to be backgrounded.
(sleep 1 ; xdotool mousemove -sync --window $WINDOWID 0 0 2>/dev/null ; xdotool mousemove 0 0 mousemove restore mousemove $X $Y 2>/dev/null) &
Diperbarui oleh damion2 pada