summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-01-14 21:05:41 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-01-15 09:52:47 +0100
commit9c3faeae633f0c1efea199e522d2413461b16345 (patch)
tree326b1bfb1d578f295c294b5060a284767257579d /vcl
parent3fa03f5d1f1543ff873e5191af68ca381d7e1d90 (diff)
Resolves: tdf#122656 keypress handled twice
Change-Id: I8a9ec82d46a3df04554c139264755c8f28f5e897 Reviewed-on: https://gerrit.libreoffice.org/66335 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/app/salvtables.cxx24
1 files changed, 23 insertions, 1 deletions
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 34c86b8fe960..19af48748b34 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -229,6 +229,9 @@ private:
}
}
+protected:
+ virtual void HandleEventListener(VclWindowEvent& rEvent);
+
public:
SalInstanceWidget(vcl::Window* pWidget, bool bTakeOwnership)
: m_xWidget(pWidget)
@@ -537,7 +540,7 @@ public:
}
};
-IMPL_LINK(SalInstanceWidget, EventListener, VclWindowEvent&, rEvent, void)
+void SalInstanceWidget::HandleEventListener(VclWindowEvent& rEvent)
{
if (rEvent.GetId() == VclEventId::WindowGetFocus || rEvent.GetId() == VclEventId::WindowActivate)
m_aFocusInHdl.Call(*this);
@@ -557,6 +560,11 @@ IMPL_LINK(SalInstanceWidget, EventListener, VclWindowEvent&, rEvent, void)
}
}
+IMPL_LINK(SalInstanceWidget, EventListener, VclWindowEvent&, rEvent, void)
+{
+ HandleEventListener(rEvent);
+}
+
namespace
{
Image createImage(const OUString& rImage)
@@ -2884,6 +2892,20 @@ private:
DECL_LINK(PopupMenuHdl, const Point&, bool);
DECL_LINK(QueryTooltipHdl, tools::Rectangle&, OUString);
+ // SalInstanceWidget has a generic listener for all these
+ // events, ignore the ones we have specializations for
+ // in VclDrawingArea
+ virtual void HandleEventListener(VclWindowEvent& rEvent) override
+ {
+ if (rEvent.GetId() == VclEventId::WindowResize ||
+ rEvent.GetId() == VclEventId::WindowKeyInput ||
+ rEvent.GetId() == VclEventId::WindowKeyUp)
+ {
+ return;
+ }
+ SalInstanceWidget::HandleEventListener(rEvent);
+ }
+
public:
SalInstanceDrawingArea(VclDrawingArea* pDrawingArea, const a11yref& rAlly,
FactoryFunction pUITestFactoryFunction, void* pUserData, bool bTakeOwnership)