[totem] backend: Don't toggle popups with touchpad clicks
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] backend: Don't toggle popups with touchpad clicks
- Date: Fri, 11 Apr 2014 13:59:23 +0000 (UTC)
commit 5f32d6ec66e5070e83faa532d5940e9404075118
Author: Bastien Nocera <hadess hadess net>
Date: Fri Apr 11 15:58:20 2014 +0200
backend: Don't toggle popups with touchpad clicks
Only toggle with touchscreens.
src/backend/bacon-video-widget.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/backend/bacon-video-widget.c b/src/backend/bacon-video-widget.c
index ee7bf95..4a5fbf9 100644
--- a/src/backend/bacon-video-widget.c
+++ b/src/backend/bacon-video-widget.c
@@ -882,10 +882,21 @@ bacon_video_widget_tap (ClutterTapAction *action,
ClutterActor *actor,
BaconVideoWidget *bvw)
{
+ ClutterInputDevice *device;
+ const ClutterEvent *event;
gboolean value;
GST_DEBUG ("Tap event received");
+ event = clutter_gesture_action_get_last_event (CLUTTER_GESTURE_ACTION (action), 0);
+ if (!event)
+ return CLUTTER_EVENT_PROPAGATE;
+
+ device = clutter_event_get_source_device (event);
+ if (device == NULL ||
+ clutter_input_device_get_device_type (device) != CLUTTER_TOUCHSCREEN_DEVICE)
+ return CLUTTER_EVENT_PROPAGATE;
+
value = (clutter_actor_get_opacity (bvw->priv->controls) == 0);
set_controls_visibility (bvw, value, FALSE);
return CLUTTER_EVENT_STOP;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]