GTK3: warning: enumeration value 'GDK_SCROLL_SMOOTH' not handled in switch [-Wswitch]

Bug #1297807 reported by su_v
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Triaged
Medium
Unassigned

Bug Description

The compiler warning "enumeration value 'GDK_SCROLL_SMOOTH' not handled in switch [-Wswitch]" prevents building with '-Werror=switch'.

Build log r13211 on Ubuntu 14.04:

  CXX ui/tools/spray-tool.o
../../src/ui/tools/spray-tool.cpp: In member function 'virtual bool Inkscape::UI::Tools::SprayTool::root_handler(GdkEvent*)':
../../src/ui/tools/spray-tool.cpp:681:24: warning: enumeration value 'GDK_SCROLL_SMOOTH' not handled in switch [-Wswitch]
                 switch (event->scroll.direction) {
                        ^

<https://launchpadlibrarian.net/170720270/buildlog_ubuntu-trusty-amd64.inkscape-trunk_1%3A0.48%2Bdevel%2B13210%2B47~ubuntu14.04.1_UPLOADING.txt.gz>

Warning from clang (LLVM 3.1svn):

../../src/ui/tools/spray-tool.cpp:681:25: warning: enumeration value 'GDK_SCROLL_SMOOTH' not handled in switch [-Wswitch-enum]
                switch (event->scroll.direction) {
                        ^

Tags: build gtk3
Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Here's some documentation from upstream:

https://developer.gnome.org/gdk3/stable/gdk3-Event-Structures.html#GdkEventScroll

Basically, this kind of scroll event can be in any direction and any magnitude rather than just the fixed UP/DOWN/LEFT/RIGHT scrolling that was handled in Gtk+ 2. We need to use gdk_event_get_scroll_deltas() to obtain the x and y displacements rather than using fixed increments... hopefully it shouldn't be too painful to implement.

su_v (suv-lp)
Changed in inkscape:
importance: Undecided → Medium
status: New → Triaged
Changed in inkscape:
importance: Medium → Low
importance: Low → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.