lsb

gdk3 gdk.h/gtk.h enums wrong values

Bug #1329508 reported by Jeff Johnson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lsb
In Progress
Medium
Unassigned
Mandriva
In Progress
Medium

Bug Description

Most of the enums defined in gtk-3.0/gdk/gdk.h have fields given
explicit values in the upstream, but have no values in the LSB version
(note the LSB gtk-2.0 ones do get assigned values). In some cases
this may be harmless but in some cases there are clear errors. These
enums all need to be examined and fixed up. Here's a partial example,
a hand-crafted bit of code to print out the first entries from
GdkEventType:

Native build:
  GDK_NOTHING = -1
  GDK_DELETE = 0
  GDK_DESTROY = 1
  GDK_EXPOSE = 2
  GDK_MOTION_NOTIFY = 3
  GDK_BUTTON_PRESS = 4
  GDK_2BUTTON_PRESS = 5
  GDK_DOUBLE_BUTTON_PRESS = 5
  GDK_3BUTTON_PRESS = 6
  GDK_TRIPLE_BUTTON_PRESS = 6
  GDK_BUTTON_RELEASE = 7
  GDK_KEY_PRESS = 8
  GDK_KEY_RELEASE = 9
  GDK_ENTER_NOTIFY = 10
  GDK_LEAVE_NOTIFY = 11

LSBCC build:
  GDK_NOTHING = 0
  GDK_DELETE = 1
  GDK_DESTROY = 2
  GDK_EXPOSE = 3
  GDK_MOTION_NOTIFY = 4
  GDK_BUTTON_PRESS = 5
  GDK_2BUTTON_PRESS = 6
  GDK_DOUBLE_BUTTON_PRESS = 7
  GDK_3BUTTON_PRESS = 8
  GDK_TRIPLE_BUTTON_PRESS = 9
  GDK_BUTTON_RELEASE = 10
  GDK_KEY_PRESS = 11
  GDK_KEY_RELEASE = 12
  GDK_ENTER_NOTIFY = 13
  GDK_LEAVE_NOTIFY = 14

notice by not giving values, we've missed the -1 for GDK_NOTHING,
which instead starts at the default 0; and the import also missed that
GDK_DOUBLE_BUTTON_PRESS and GDK_TRIPLE_BUTTON_PRESS are aliases and
don't take distinct values. They're defined as follows in the upstream
header:

  GDK_2BUTTON_PRESS = 5,
  GDK_DOUBLE_BUTTON_PRESS = GDK_2BUTTON_PRESS,
  GDK_3BUTTON_PRESS = 6,
  GDK_TRIPLE_BUTTON_PRESS = GDK_3BUTTON_PRESS,

Tags: spec gtk3 zclose
Changed in mandriva:
importance: Unknown → Medium
status: Unknown → In Progress
Jeff Johnson (n3npq)
tags: added: zclose
tags: added: gtk3
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

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