Re: _NET_WM_USER_TIME reconsidered



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 );

-- 
Lubos Lunak
KDE developer
--------------------------------------------------------------
SUSE LINUX, s.r.o.   e-mail: l lunak suse cz , l lunak kde org
Lihovarska 1060/12   tel: +420 284 028 972
190 00 Prague 9      fax: +420 284 028 951
Czech Republic       http//www.suse.cz



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