XEMBED: Preventing focus loops

Owen Taylor otaylor at redhat.com
Thu Aug 21 19:21:08 EEST 2003

On Thu, 2003-08-21 at 12:02, Keith Packard wrote:
> Around 9 o'clock on Aug 21, Owen Taylor wrote:
> >   * assign a unique ID to the focus sequence so that an 
> >     individual embedder could check if it was repeating
> >     a focus sequence.
> Is the timestamp not sufficiently unique?

No -

It's pretty frequent to have focus changes that don't correspond
to any user action (e.g., focus the first widget in the window
when it is initally mapped), and those cases are either going to 
get CurrentTime or a timestamp from the last event with 
a timestamp, neither of which is usefully unique. You could do the 
PropertyChangeNotify trick to get the real server time, but
that's slow, and for non-user-events, I don't think it's 
safe to assume that two won't occur in the same millisecond.


More information about the xdg mailing list