diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2015-02-24 15:56:42 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-03-11 10:45:50 +0000 |
commit | 67ff4ba5294352b7ed948b196551dea331ee0877 (patch) | |
tree | 107a99f839610675b36444c5de18ef5a70da4932 /vcl | |
parent | 556373c41fddbac6cbee1c89e7707631270a1852 (diff) |
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
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/generic/app/saldisp.cxx | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx index 3c95b574d9a3..29c786de0f26 100644 --- a/vcl/unx/generic/app/saldisp.cxx +++ b/vcl/unx/generic/app/saldisp.cxx @@ -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; |