[Project_owners] window.focus() failing on Linux

Neil neil at parkwaycc.co.uk
Wed Aug 27 02:07:04 PDT 2008

Michael Vincent van Rantwijk, MultiZilla wrote:

> Neil wrote:
>> Michael Vincent van Rantwijk, MultiZilla wrote:
>>> I can't get window.focus() to work on Ubuntu Linux.  It appears to 
>>> be limited to SeaMonkey because it works in Mozilla Firefox. Anyone 
>>> found a workaround for this bug?
>>> Note that calling window.focus() a number of times will bring the 
>>> window in the foreground, but the title bar at the top has the wrong 
>>> color, as if it isn't really focused.
>> This is normal behaviour for window.focus() on Linux, and we use 
>> identical widget code; maybe your window manager special-cases Firefox?
> You mean that I have to call window.focus() a couple of time for it 
> works, or that when that works that the title bar isn't focused?

Ah, sorry for not reading your message carefully enough, but I meant 
that my understanding is that it should raise the window without 
activating it. If you know your gtk programming (I don't), feel free to 
read widget/src/gtk2/nsWindow.cpp's nsWindow::SetFocus method.

More information about the Project_owners mailing list