~ps-jenkins/libgrip/utopic-proposed

« back to all changes in this revision

Viewing changes to src/gripgesturemanager.c

  • Committer: Tarmac
  • Author(s): Stephen M. Webb
  • Date: 2014-02-25 17:10:13 UTC
  • mfrom: (89.1.2 lp-1276333)
  • Revision ID: tarmac-20140225171013-rn91y9tq28xsw3pb
p revent the Geis object from being used until it has been successfully initialized (lp: #1276333). Fixes: https://bugs.launchpad.net/bugs/1276333.

Approved by PS Jenkins bot, Brandon Schaefer.

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
/*
51
51
 * GripGestureManagerPrivate:
52
52
 * @geis: the GEIS instance
 
53
 * @is_initialized: GEIS async initialization has been successfully completed
53
54
 * @iochannel: connects the geis object with the main loop
54
55
 * @iochannel_id: the identifier for the iochannel
55
56
 * @devices: a collection of recognized input devices
60
61
struct _GripGestureManagerPrivate
61
62
{
62
63
  Geis              geis;
 
64
  gboolean          is_initialized;
63
65
  GIOChannel       *iochannel;
64
66
  int               iochannel_id;
65
67
  GripDevices      *devices;
258
260
      break;
259
261
 
260
262
    case GEIS_EVENT_INIT_COMPLETE:
 
263
      priv->is_initialized = TRUE;
261
264
      break;
262
265
 
263
266
    case GEIS_EVENT_GESTURE_BEGIN:
660
663
  GripGestureManagerPrivate *priv = self->priv = GRIP_GESTURE_MANAGER_GET_PRIVATE (self);
661
664
  priv->devices = g_ptr_array_new ();
662
665
 
 
666
  priv->is_initialized = FALSE;
663
667
  priv->geis = geis_new (GEIS_INIT_TRACK_DEVICES, GEIS_INIT_TRACK_GESTURE_CLASSES, NULL);
664
668
  g_return_if_fail (priv->geis);
665
669
 
722
726
  g_return_if_fail (GTK_IS_WINDOW (toplevel));
723
727
 
724
728
  GripGestureManagerPrivate *priv = req->manager->priv;
 
729
  if (!priv->is_initialized)
 
730
    return;
725
731
 
726
732
  guint window_id = GDK_WINDOW_XID (gtk_widget_get_window(toplevel));
727
733