[totem] backend: Hide popups when leaving the window
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] backend: Hide popups when leaving the window
- Date: Fri, 11 Apr 2014 10:03:12 +0000 (UTC)
commit 4207cb0c14008bce0044e25f82f9e2a5829c4512
Author: Bastien Nocera <hadess hadess net>
Date: Fri Apr 11 12:00:46 2014 +0200
backend: Hide popups when leaving the window
https://bugzilla.gnome.org/show_bug.cgi?id=727220
src/backend/bacon-video-widget.c | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/src/backend/bacon-video-widget.c b/src/backend/bacon-video-widget.c
index 37c80a8..0a60f65 100644
--- a/src/backend/bacon-video-widget.c
+++ b/src/backend/bacon-video-widget.c
@@ -808,6 +808,24 @@ bacon_video_widget_motion_notify (GtkWidget *widget, GdkEventMotion *event)
}
static gboolean
+bacon_video_widget_leave_notify (GtkWidget *widget, GdkEventCrossing *event)
+{
+ gboolean res = GDK_EVENT_PROPAGATE;
+ BaconVideoWidget *bvw = BACON_VIDEO_WIDGET (widget);
+ GdkDevice *device;
+ int x, y;
+
+ device = gdk_event_get_source_device ((GdkEvent *) event);
+ if (gdk_device_get_source (device) == GDK_SOURCE_TOUCHSCREEN)
+ return res;
+
+ if (bvw->priv->reveal_controls)
+ set_controls_visibility (bvw, FALSE, TRUE);
+
+ return res;
+}
+
+static gboolean
bacon_video_widget_button_press_or_release (GtkWidget *widget, GdkEventButton *event)
{
gboolean res = FALSE;
@@ -1009,6 +1027,7 @@ bacon_video_widget_class_init (BaconVideoWidgetClass * klass)
widget_class->realize = bacon_video_widget_realize;
widget_class->motion_notify_event = bacon_video_widget_motion_notify;
+ widget_class->leave_notify_event = bacon_video_widget_leave_notify;
widget_class->button_press_event = bacon_video_widget_button_press_or_release;
widget_class->button_release_event = bacon_video_widget_button_press_or_release;
widget_class->scroll_event = bacon_video_widget_scroll;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]