Re: Sawfish focus issues [was: Re: gnome-libs patch]
- From: Michael Meeks <michael helixcode com>
- To: john dcs warwick ac uk
- Cc: Federico Mena Quintero <federico helixcode com>, Dan Winship <danw helixcode com>, gnome-hackers gnome org
- Subject: Re: Sawfish focus issues [was: Re: gnome-libs patch]
- Date: Sat, 23 Dec 2000 10:37:16 -0500 (EST)
Hi John,
On Wed, 20 Dec 2000 john dcs warwick ac uk wrote:
> John Harper writes:
> |I'm unable to build evolution currently, so I can't test this problem.
> |(I can't make it happen with nautilus.) I'll keep trying..
> |
> |Why does bonobo call XSetInputFocus anyway?
>
> Okay, I see the problem. I think it's caused by bonobo-socket.c
> passing CurrentTime to XSetInputFocus (). This is a really bad idea,
> it should only ever pass the most recent timestamp it received from
> the server.
First of all; bonobo-socket.c is a modified version of
gtk-socket.c, modified to nail a potential race condition and allow fixes
to be made in real-time.
I know little / nothing of X's ways with timestamping events,
however when I last investigated it it seemed to me that the best we could
do here was to use CurrentTime to stamp the XSetInputFocus.
The function is called in bonobo-socket's implementations of
GtkWidget's focus_in and focus_out methods. These both get a
GdkEventFocus, which as it appears to me passes no time stamp. Hence
gtk_event_get_time will only return CurrentTime.
Now; we also call XSetInputFocus from bonobo_socket_claim_focus,
this is in turn called from the bonobo-socket implementation of
GtkContainer's focus method; which again carries no time information I can
see.
bonobo_socket_claim_focus is also called from
bonobo_socket_filter_func which starts poking at the X event structures;
and inside the xevent->type == FocusIn case, we do:
if (xevent->xfocus.mode == EMBEDDED_APP_WANTS_FOCUS)
bonobo_socket_claim_focus (socket);
Then again, according to the XFocusChangeEvent man page there is
no time stamp on the X event either.
So; all in all, I don't know how you propose to pass the most
recent timestamp received from the server; perhaps this can be done via
the serial number, or some API that I am not aware of.
Either way, I would greatly value your assistance in resolving
this since I am not an X expert.
Regards,
Michael.
--
mmeeks gnu org <><, Pseudo Engineer, itinerant idiot
_______________________________________________
gnome-hackers mailing list
gnome-hackers gnome org
http://mail.gnome.org/mailman/listinfo/gnome-hackers
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]