/* try to get the pointer */
if (!(ptr = grab->pointer)) return;
+ if (state == WL_POINTER_BUTTON_STATE_RELEASED)
+ ptr->button_count--;
+ else
+ ptr->button_count++;
+
if (ptr->button_count == 1)
ptr->grab_serial = wl_display_get_serial(_e_wl_comp->wl.display);
/* try to get the pointer */
if (!(ptr = grab->pointer)) return;
+ if (state == WL_POINTER_BUTTON_STATE_RELEASED)
+ ptr->button_count--;
+ else
+ ptr->button_count++;
+
if (ptr->button_count == 1)
ptr->grab_serial = wl_display_get_serial(_e_wl_comp->wl.display);