On 2009-01-21, Daniel Clemente <dcl441-b...@yahoo.com> wrote: > So the focus problem seems to be a regression introduced in version 1.6 > of Java and still not corrected... Or maybe it is indeed a bug in ion3; > since other window managers (ex: icewm) do work with Java 1.6.
It seems that at most it could be related to different interpretations of the ICCCM that's a bit vague at this point, race conditions, etc. One possible problem is the handling of the WM_TAKE_FOCUS call, although most "modern" toolkits just seem to ignore X focus for any widgets, and do their own complicated buggy focus tracking, (cause of the legendary firefox/gtk focus bug that took years to fix, and only by an Ion user, not the gtk lamers) so WM_TAKE_FOCUS should pretty much be ignored. Try moving the region_finalise_focusing call to the beginning of clientwin_do_set_focus. This could help -- and seems to be the more logical order of the calls -- but it will probably break some other applications. The ICCCM doesn't seem to specify in which order the WM should set the focus to the application top level window, and send the WM_TAKE_FOCUS message that tells the client to give the focus to a more specific widget. Also, since there's no (simple) way to coordinate the timestamp of the actual focus change call with Xlib, and the timestamp for the client message has to be obtained by a hack, this could cause problems. Probably it won't help, and will break other things, but it seems worth a try. -- Be an early adopter! Beat the herd! Choose Windows today!