Re: VERY cool UI fix (long but hopefully interesting)



>There are some X11 protocol design mistakes that makes it painful to
>reliably figure out where input focus is.  I believe it can be done,
>but is much harder than it ought to be for toolkit builders. Sorry...

>However, I object to people working around bugs unless absolutely
>necessary: if there are real bugs in this area (where the servers aren't
>doing what the X11 protocol demands), those servers should get
fixed/upgraded
>rather than working around the bugs forever.  Remember: due to Linux's
>success, a high fraction of X servers get upgraded every year, and so we
>should get the bugs fixed rather than suffering forever.  This is a change
>over, say, 5 years ago, where X servers were mouldering on UNIX
workstations
>and getting bugs fixed were painful and hard due to a very long product
>cycle.

>>
>> Note that this don't use the leave event which is broken on a lot of
>> X-servers.
>>
>> John
>                              - Jim

The right way to do this is to stop the timer when the pointer leaves
the window with the leave event, then you *know* the focus is gone. As
I recall more or less all HP X-terminals had problems with the leave
event.

There is at least one workaround for this where the timer is put in the
menubar component. In this version you don't need the leave event. Downside
is you get the last focused application instead of the last focused
application
where the timer went off if you don't enter the menu bar. That is, the next
enter event fakes a leave of the previous window and the timer is "the last
window" if the pointer doesn't enter the menubar.

There is no reason to choose one in preference to the other due to
complexity
but the last one will sometimes initiate an "unwanted" menubar. I belive the
right one is the menubar of the window that had the pointer focus "for some
time" but..

John Blad




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]