[Libreoffice-commits] core.git: vcl/unx
Luboš Luňák
l.lunak at collabora.com
Wed Mar 11 03:41:34 PDT 2015
vcl/unx/generic/app/saldisp.cxx | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
New commits:
commit 67ff4ba5294352b7ed948b196551dea331ee0877
Author: Luboš Luňák <l.lunak at collabora.com>
Date: Tue Feb 24 15:56:42 2015 +0100
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
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index 3c95b57..29c786d 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;
More information about the Libreoffice-commits
mailing list