GeisSubscriptionFlags declared as enum when it is really a bitmask

Bug #813819 reported by Chase Douglas
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Geis
Low
Chase Douglas
utouch-geis (Ubuntu)
Low
Unassigned
Precise
Low
Unassigned

Bug Description

The current definition of GeisSubscriptionFlags is:

typedef enum GeisSubscriptionFlags
{
  GEIS_SUBSCRIPTION_NONE = 0x0000,
  GEIS_SUBSCRIPTION_GRAB = 0x0001,
  GEIS_SUBSCRIPTION_CONT = 0x0002
} GeisSubscriptionFlags;

This prevents the following code from compiling under g++:

GeisSubscriptionFlags flags = GEIS_SUBSCRIPTION_GRAB | GEIS_SUBSCRIPTION_CONT;

This is because the value of the result does not match any in the enum. Geis should use an anonymous enum for the flags definition, but a typedef of an int for GeisSubscriptionFlags.

A workaround is to define the flags variable as an int.

Changed in utouch-geis:
status: New → Triaged
importance: Undecided → Medium
importance: Medium → Low
assignee: nobody → Stephen M. Webb (bregma)
description: updated
Changed in utouch-geis:
assignee: Stephen M. Webb (bregma) → Chase Douglas (chasedouglas)
Changed in utouch-geis:
milestone: none → utouch-geis-2.2.10
Changed in utouch-geis (Ubuntu):
importance: Undecided → Low
Changed in utouch-geis:
status: Triaged → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

Can you please upload the fixes to quantal?

Changed in utouch-geis (Ubuntu):
status: New → Triaged
Changed in utouch-geis (Ubuntu Precise):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello Chase, or anyone else affected,

Accepted utouch-geis into precise-proposed. The package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in utouch-geis (Ubuntu Precise):
importance: Undecided → Low
Revision history for this message
Chase Douglas (chasedouglas) wrote :

I have verified that GeisSubscriptionFlags is defined appropriately in libutouch-geis-dev_2.2.9-0ubuntu3 in precise-proposed.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package utouch-geis - 2.2.9-0ubuntu3

---------------
utouch-geis (2.2.9-0ubuntu3) precise-proposed; urgency=low

  [ Chase Douglas ]
  * fixed calculation of touch deltas (lp: #985916)
  * calculated pinch radius delta as ratio (lp: #986215)
  * fixed a C++ compile fail due to enum types (lp: #813819)

  [ Stephen M. Webb ]
  * added device axis attributes (regression) (lp: #987539)
 -- <email address hidden> (Stephen M. Webb) Fri, 27 Apr 2012 13:10:00 -0400

Changed in utouch-geis (Ubuntu Precise):
status: Fix Committed → Fix Released
Changed in utouch-geis (Ubuntu):
status: Triaged → Fix Released
Changed in utouch-geis:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers