[Libreoffice-commits] core.git: vcl/inc vcl/unx
Noel Grandin
noel.grandin at collabora.co.uk
Wed Jan 24 07:43:44 UTC 2018
vcl/inc/unx/gtk/gtkdata.hxx | 2 +-
vcl/inc/unx/saldisp.hxx | 4 ++--
vcl/unx/generic/app/saldisp.cxx | 14 ++++++++------
vcl/unx/gtk/gtkdata.cxx | 9 ++++-----
vcl/unx/kde4/VCLKDEApplication.cxx | 3 +--
5 files changed, 16 insertions(+), 16 deletions(-)
New commits:
commit 025c58f7ea613c2271e43e6639d734e4d478621d
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Wed Jan 24 09:37:31 2018 +0200
fix kde4 vclplug build
by reverting parts of
commit de8f6b25de6fbe813fe172542e7eff1596b37335
loplugin:unused-returns in vcl
and reverting
commit 78bb1a2a51a991f605ae5c51d813697673bbc67
Fix --enable-kde4 codeHEAD
<noelgrandin> sberg, is that safe ^^ ? I was just about to push a partial revert of the commit that caused the breakage
<sberg> noelgrandin, oops, I'd naively assumed that all impls of Dispatch had just always returned true
Change-Id: Icbca450a76de30a04bc90a2887066840191c9d5f
diff --git a/vcl/inc/unx/gtk/gtkdata.hxx b/vcl/inc/unx/gtk/gtkdata.hxx
index d612ef64a151..31440f0f3655 100644
--- a/vcl/inc/unx/gtk/gtkdata.hxx
+++ b/vcl/inc/unx/gtk/gtkdata.hxx
@@ -185,7 +185,7 @@ public:
virtual void TriggerAllUserEventsProcessed() override;
#if !GTK_CHECK_VERSION(3,0,0)
- virtual void Dispatch( XEvent *pEvent ) override;
+ virtual bool Dispatch( XEvent *pEvent ) override;
#endif
#if GTK_CHECK_VERSION(3,0,0)
void RefreshMenusUnity();
diff --git a/vcl/inc/unx/saldisp.hxx b/vcl/inc/unx/saldisp.hxx
index e91efe244b44..259af28e63a8 100644
--- a/vcl/inc/unx/saldisp.hxx
+++ b/vcl/inc/unx/saldisp.hxx
@@ -291,7 +291,7 @@ protected:
mutable Time m_nLastUserEventTime; // mutable because changed on first access
- virtual void Dispatch( XEvent *pEvent ) = 0;
+ virtual bool Dispatch( XEvent *pEvent ) = 0;
void InitXinerama();
void InitRandR( ::Window aRoot ) const;
void DeInitRandR();
@@ -389,7 +389,7 @@ public:
SalX11Display( Display* pDisp );
virtual ~SalX11Display() override;
- virtual void Dispatch( XEvent *pEvent ) override;
+ virtual bool Dispatch( XEvent *pEvent ) override;
virtual void Yield();
virtual void TriggerUserEventProcessing() override;
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index 75c1862803df..767cf81aa239 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -1924,7 +1924,7 @@ void SalX11Display::Yield()
GetX11SalData()->ResetXErrorOccurred();
}
-void SalX11Display::Dispatch( XEvent *pEvent )
+bool SalX11Display::Dispatch( XEvent *pEvent )
{
SalI18N_InputMethod* const pInputMethod =
( pXLib_ ) ? pXLib_->GetInputMethod() : nullptr;
@@ -1947,7 +1947,7 @@ void SalX11Display::Dispatch( XEvent *pEvent )
}
}
if( pInputMethod->FilterEvent( pEvent, aFrameWindow ) )
- return;
+ return false;
}
SalInstance* pInstance = GetSalData()->m_pInstance;
@@ -1972,7 +1972,7 @@ void SalX11Display::Dispatch( XEvent *pEvent )
{
for (auto pSalFrame : m_aFrames )
pSalFrame->CallCallback( SalEvent::SettingsChanged, nullptr );
- return;
+ return false;
}
}
}
@@ -1998,7 +1998,7 @@ void SalX11Display::Dispatch( XEvent *pEvent )
&& GetKbdExtension()->GetEventBase() == pEvent->type )
{
GetKbdExtension()->Dispatch( pEvent );
- return;
+ return true;
}
break;
}
@@ -2013,11 +2013,11 @@ void SalX11Display::Dispatch( XEvent *pEvent )
|| pFrame->GetForeignParent() == aDispatchWindow
)
{
- pFrame->Dispatch( pEvent );
+ return pFrame->Dispatch( pEvent );
}
if( pEvent->type == ConfigureNotify && pEvent->xconfigure.window == pFrame->GetStackingWindow() )
{
- pFrame->Dispatch( pEvent );
+ return pFrame->Dispatch( pEvent );
}
}
@@ -2026,6 +2026,8 @@ void SalX11Display::Dispatch( XEvent *pEvent )
// is this perhaps a root window that changed size ?
processRandREvent( pEvent );
+
+ return false;
}
#ifdef DBG_UTIL
diff --git a/vcl/unx/gtk/gtkdata.cxx b/vcl/unx/gtk/gtkdata.cxx
index 9c96b8fde049..7c9a3d1e0fbc 100644
--- a/vcl/unx/gtk/gtkdata.cxx
+++ b/vcl/unx/gtk/gtkdata.cxx
@@ -205,7 +205,7 @@ GtkSalDisplay::initScreen( SalX11Screen nXScreen ) const
return pSD;
}
-void GtkSalDisplay::Dispatch( XEvent* pEvent )
+bool GtkSalDisplay::Dispatch( XEvent* pEvent )
{
if( GetDisplay() == pEvent->xany.display )
{
@@ -214,12 +214,11 @@ void GtkSalDisplay::Dispatch( XEvent* pEvent )
for (auto pSalFrame : m_aFrames )
{
if (pSalFrame->GetSystemData()->aWindow == pEvent->xany.window)
- {
- static_cast<GtkSalFrame*>( pSalFrame )->Dispatch( pEvent );
- return;
- }
+ return static_cast<GtkSalFrame*>( pSalFrame )->Dispatch( pEvent );
}
}
+
+ return false;
}
GdkCursor* GtkSalDisplay::getFromXBM( const unsigned char *pBitmap,
diff --git a/vcl/unx/kde4/VCLKDEApplication.cxx b/vcl/unx/kde4/VCLKDEApplication.cxx
index 319ce17cce13..78181b2a486c 100644
--- a/vcl/unx/kde4/VCLKDEApplication.cxx
+++ b/vcl/unx/kde4/VCLKDEApplication.cxx
@@ -33,9 +33,8 @@ bool VCLKDEApplication::x11EventFilter(XEvent* ev)
{
//if we have a display and the display consumes the event
//do not process the event in qt
- if (SalKDEDisplay::self())
+ if (SalKDEDisplay::self() && SalKDEDisplay::self()->Dispatch(ev))
{
- SalKDEDisplay::self()->Dispatch(ev);
return true;
}
More information about the Libreoffice-commits
mailing list