Re: _NET_WM_USER_TIME reconsidered
- From: Carlos Eduardo Rodrigues Diógenes <cerdiogenes yahoo com br>
- To: Bill Haneman <Bill Haneman Sun COM>
- Cc: wm-spec-list gnome org, Matthias Clasen <mclasen redhat com>
- Subject: Re: _NET_WM_USER_TIME reconsidered
- Date: Tue, 26 Sep 2006 13:37:59 -0300
Hi Bill,
Em Ter, 2006-09-26 às 17:12 +0100, Bill Haneman escreveu:
> ...
>
> As an aside, why isn't there a race in the setproperty/IfEvent code
> below? (You can answer me offline)
I don't understand your question here Bill. What do you mean by "a
race"?
>
> Bill
Carlos.
>
> Matthias Clasen wrote:
>
> >On Tue, 2006-09-26 at 17:58 +0200, Lubos Lunak wrote:
> >
> >
> >>Dne úterý 26 září 2006 12:21 Bill Haneman napsal(a):
> >>
> >>
> >>>Matthias/All:
> >>>
> >>>The whole _NET_WM_USER_TIME thing is a continuing problem for
> >>>accessibility, as it now stands. In an assistive technology setting,
> >>>there isn't always an X event that corresponds to the "user action"
> >>>which results in a new window being posted or focus changing. Since X
> >>>doesn't allow us to get a meaningful answer to "what's the current
> >>>timestamp", we have serious problems when trying to interact with
> >>>windows via non-X-device-based user requests.
> >>>
> >>>We really need a solution for this!
> >>>
> >>>
> >> Copy&paste from KApplication::updateUserTimestamp():
> >>
> >>// get current X timestamp
> >>Window w = XCreateSimpleWindow( qt_xdisplay(), qt_xrootwin(), 0, 0, 1, 1, 0,
> >>0, 0 );
> >>XSelectInput( qt_xdisplay(), w, PropertyChangeMask );
> >>unsigned char data[ 1 ];
> >>XChangeProperty( qt_xdisplay(), w, XA_ATOM, XA_ATOM, 8, PropModeAppend, data,
> >>1 );
> >>XEvent ev;
> >>XWindowEvent( qt_xdisplay(), w, PropertyChangeMask, &ev );
> >>time = ev.xproperty.time;
> >>XDestroyWindow( qt_xdisplay(), w );
> >>
> >>
> >>
> >
> >Here is the gdk equivalent:
> >
> >guint32
> >gdk_x11_get_server_time (GdkWindow *window)
> >{
> > Display *xdisplay;
> > Window xwindow;
> > guchar c = 'a';
> > XEvent xevent;
> > Atom timestamp_prop_atom;
> > g_return_val_if_fail (GDK_IS_WINDOW (window), 0);
> > g_return_val_if_fail (!GDK_WINDOW_DESTROYED (window), 0);
> > xdisplay = GDK_WINDOW_XDISPLAY (window);
> > xwindow = GDK_WINDOW_XWINDOW (window);
> > timestamp_prop_atom =
> > gdk_x11_get_xatom_by_name_for_display (GDK_WINDOW_DISPLAY (window),
> > "GDK_TIMESTAMP_PROP");
> > XChangeProperty (xdisplay, xwindow, timestamp_prop_atom,
> > timestamp_prop_atom,
> > 8, PropModeReplace, &c, 1);
> > XIfEvent (xdisplay, &xevent,
> > timestamp_predicate, GUINT_TO_POINTER(xwindow));
> > return xevent.xproperty.time;
> >}
> >
> >it is even exported, so you can just use it.
> >
> >
> >_______________________________________________
> >wm-spec-list mailing list
> >wm-spec-list gnome org
> >http://mail.gnome.org/mailman/listinfo/wm-spec-list
> >
> >
>
> _______________________________________________
> wm-spec-list mailing list
> wm-spec-list gnome org
> http://mail.gnome.org/mailman/listinfo/wm-spec-list
_______________________________________________________
Voc�uer respostas para suas perguntas? Ou voc�abe muito e quer compartilhar seu conhecimento? Experimente o Yahoo! Respostas !
http://br.answers.yahoo.com/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]