Kaydet (Commit) 67ff4ba5 authored tarafından Luboš Luňák's avatar Luboš Luňák Kaydeden (comit) Michael Meeks

dump ugly hack working around an ancient libxcb bug (tdf#89141)

According to the X protocol log in the bugreport, this timed function
sometimes does time out, in which case the timestamp becomes 0, which
as user timestamp is interpreted by window managers as "do not focus",
which is indeed stupid to ask for just because a call timed out.
Especially given that this is broken in principle, as the event is
bound to come (barring the more than 5 years old libxcb bug, which
must have been such a lame bug that it probably shouldn't even have
been worked around, and definitely not unconditionally and permanently).

Change-Id: I4d122ea038c0c56b1fda590df13bf119d746fd0a
üst 556373c4
......@@ -2317,14 +2317,7 @@ Time SalDisplay::GetLastUserEventTime( bool i_bAlwaysReget ) const
Atom nAtom = getWMAdaptor()->getAtom( WMAdaptor::SAL_GETTIMEEVENT );
XChangeProperty( GetDisplay(), GetDrawable( GetDefaultXScreen() ),
nAtom, nAtom, 8, PropModeReplace, &c, 1 );
XFlush( GetDisplay() );
if( ! XIfEventWithTimeout( &aEvent, reinterpret_cast<XPointer>(const_cast<SalDisplay *>(this)), timestamp_predicate ) )
{
// this should not happen at all; still sometimes it happens
aEvent.xproperty.time = CurrentTime;
}
XIfEvent( GetDisplay(), &aEvent, timestamp_predicate, reinterpret_cast<XPointer>(const_cast<SalDisplay *>(this)));
m_nLastUserEventTime = aEvent.xproperty.time;
}
return m_nLastUserEventTime;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment