Re: [wmii] focus switch - race condition?

From: Kris Maglione <>
Date: Mon, 12 Jan 2009 18:35:40 -0500

On Mon, Jan 12, 2009 at 03:27:08PM -0800, Suraj Kurapati wrote:
>On Sun, Jan 11, 2009 at 12:54 PM, Suraj Kurapati <> wrote:
>> 4. In the next moment, the SELCOLORS shifts from the main jEdit
>> window to the "File open" dialog. I observe that the "File open"
>> dialog's window border is given SELCOLORS, and then the main jEdit
>> window loses its SELCOLORS. That is, there is a brief moment when
>> *both* the "File open" dialog and the main jEdit window have
>If I begin typing during this SELCOLORS transition period, the bug
>occurs and the "File open" dialog no longer receives any keystrokes.
>This seems like a race condition between me typing and wmii switching
>the focus between clients.

wmii doesn't change the focus, it tells the window to take the
focus and updates the colors when it does so. Two windows never
have selcolors at the same time, not unless one has an extra
1-pixel border of normcolors (indicating that that one has
keyboard focus, while wmii considers the other one to be
active). If there's a race condition, it's not in wmii, but in
the Java app or runtime. Either way, I still can't reproduce
this. (I can still reproduce the pixel rendering bug, though).

Kris Maglione
Most software today is very much like an Egyptian pyramid with
millions of bricks piled on top of each other, with no structural
integrity, but just done by brute force and thousands of slaves.
	--Alan Kay
Received on Mon Jan 12 2009 - 23:35:40 UTC

This archive was generated by hypermail 2.2.0 : Mon Jan 12 2009 - 23:48:05 UTC