Thunderbird doesn't raise or give focus when you click "Write" or "Reply"

I'm using Thunderbird 2.0.22, the version that comes with Ubuntu Intrepid 8.10.

When I hit "Reply" or "Write", a new email window pops up, but it ends up being under the main Thunderbird Window, and doesn't have focus. Thunderbird is the only application that exhibits this weird behaviour, and it just started happening one day, whereas it worked fine before.

I've seen this problem years ago as well, and wasn't sure how I fixed it.


Solution 1:

I've seen this before with X applications. Think about the steps that need to occur:

  • create the child window
  • renders initial content into the child window
  • make the child window visible - i.e. "on top" of the stack, either in the current virtual workspace or the workspace of the parent window. Either one can work; neither one is perfect.

You don't want the window to be visible before the initial content is rendered; this makes things look ugly. You want it to pre-render everything with the window hiding somewhere, then bring the window to front.

Often the "to front" logic is handled in a window finalization routine. Think about what would happen in the case where something derails the window layout. Say, final decisions about initial content for widgets or similar. The finalization routine may never get called.

So, a mostly (or maybe even totally) right looking window gets left sitting there, behind the main application window.

If there was some cruft in one of the config files in your ~/.mozilla-thunderbird directory, that could very well have caused the second step above (child window rendering) to fail.

Solution 2:

Deleting all *.msf files should help:

cd ~/.thunderbird/<profiledir>/
find ./  -name '*.msf' -exec rm {} \;

Solution 3:

I have been plagued by this problem as well for the last months and under Linux most of the time the problem can be related to "unclutter". Using the "-noevents" switch removes all strange behavior of the mouse focus. The configuration can be found in

/etc/default/unclutter

and the according line looks like:

EXTRA_OPTS="-idle 1 -root -noevents"

For a detailed analysis look into this kubuntuforum-post (its not from me!).