[Gllug] Mozilla Firefox takes focus in KDE

Richard Jones rich at annexia.org
Sun May 9 22:18:16 UTC 2004


On Sun, May 09, 2004 at 10:49:23PM +0100, Rev Simon Rumble wrote:
> Firefox seems to have taken on IE-like annoying behaviour with regard
> to window focus.  Several times while loading a page, it switches me
> to its virtual screen.  Most annoying.  I regularly load pages and
> switch to another window, coming back later when it's loaded.
> 
> I'm using KDE and have Focus Stealing Prevention Level set to
> "Extreme".  How else can I stop it?  Google doesn't seem to have much
> on this...

I've actually been doing a bit of Mozilla development recently, and it
seems likely that the focus grab will be in the Javascript front end
of Firefox.  And so reasonably easy to modify.

Start by finding and unzipping 'browser.jar' [or it might be
'comm.jar'] from the chrome directory.  Look into the content/browser
[or content/navigator] for Javascript files.  Basically you'll need to
find the call or calls to '[...].focus()' that is affecting you and
comment it out.

You should be able to run Firefox with the jar files unpacked under
the chrome directory, but you'll need to modify installed-chrome.txt,
delete chrome.rdf entirely and of course restart the browser.  The
chrome installation procedure under Mozilla is incredibly flaky
however, and sometimes it'll just ignore chrome for no readily
apparent reason.

BTW, my Mozilla book suggests that all new windows should grab the
focus otherwise unspecified bad things will happen.  This is probably
why they are grabbing focus.  Why exactly this is necessary isn't
clear (lots of other X programs seem to work just fine without taking
focus).  But then there's a lot of strange NIH stuff going on inside
Mozilla so it doesn't surprise me very much.  The product of too many
developers with too much time and no direction ...

Rich.

-- 
Richard Jones. http://www.annexia.org/ http://www.j-london.com/
Merjis Ltd. http://www.merjis.com/ - improving website return on investment
NET::FTPSERVER is a full-featured, secure, configurable, database-backed
FTP server written in Perl: http://www.annexia.org/freeware/netftpserver/
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list