summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Persch <chpe@src.gnome.org>2020-11-02 23:02:18 +0100
committerChristian Persch <chpe@src.gnome.org>2020-11-02 23:02:18 +0100
commit37722d9a7c13f32ed62caa817f7b26413c7c3b8a (patch)
tree79ef237603bce99aa75c9516b970662ffb8fa972
parent87f70c44341879226443df403ab50b65f89c84ce (diff)
downloadvte-37722d9a7c13f32ed62caa817f7b26413c7c3b8a.tar.gz
widget: Scroll events have no button
-rw-r--r--src/widget.cc4
-rw-r--r--src/widget.hh3
2 files changed, 1 insertions, 6 deletions
diff --git a/src/widget.cc b/src/widget.cc
index b5b741c9..b0fe5f3e 100644
--- a/src/widget.cc
+++ b/src/widget.cc
@@ -492,9 +492,6 @@ Widget::mouse_event_from_gdk(GdkEvent* event) const /* throws */
ScrollEvent
Widget::scroll_event_from_gdk(GdkEvent* event) const /* throws */
{
- auto button = unsigned{0};
- (void)gdk_event_get_button(event, &button);
-
auto x = double{}, y = double{};
if (gdk_event_get_window(event) != m_event_window ||
!gdk_event_get_coords(event, &x, &y))
@@ -517,7 +514,6 @@ Widget::scroll_event_from_gdk(GdkEvent* event) const /* throws */
}
return {read_modifiers_from_gdk(event),
- ScrollEvent::Button(button),
x, y,
dx, dy};
}
diff --git a/src/widget.hh b/src/widget.hh
index 5cdc382a..295789bd 100644
--- a/src/widget.hh
+++ b/src/widget.hh
@@ -206,7 +206,6 @@ protected:
ScrollEvent() noexcept = default;
constexpr ScrollEvent(unsigned modifiers,
- Button button,
double x,
double y,
double dx,
@@ -214,7 +213,7 @@ protected:
: MouseEvent{EventBase::Type::eMOUSE_SCROLL,
1, // press count
modifiers,
- button,
+ MouseEvent::Button::eNONE,
x,
y},
m_dx{dx},