aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-call-window.c
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-08-09 22:34:44 +0800
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-08-15 19:14:54 +0800
commitc3b3b11b227dd8add44c83c264b79b8c9168f94d (patch)
tree3a8306279343f6fd4ca7f8c3da3c333e11748396 /src/empathy-call-window.c
parent9fba3fff14e9628c46f667ca1022e0af46693cb2 (diff)
downloadgsoc2013-empathy-c3b3b11b227dd8add44c83c264b79b8c9168f94d.tar
gsoc2013-empathy-c3b3b11b227dd8add44c83c264b79b8c9168f94d.tar.gz
gsoc2013-empathy-c3b3b11b227dd8add44c83c264b79b8c9168f94d.tar.bz2
gsoc2013-empathy-c3b3b11b227dd8add44c83c264b79b8c9168f94d.tar.lz
gsoc2013-empathy-c3b3b11b227dd8add44c83c264b79b8c9168f94d.tar.xz
gsoc2013-empathy-c3b3b11b227dd8add44c83c264b79b8c9168f94d.tar.zst
gsoc2013-empathy-c3b3b11b227dd8add44c83c264b79b8c9168f94d.zip
Factor out empathy_call_window_get_preview_position()
https://bugzilla.gnome.org/show_bug.cgi?id=656268
Diffstat (limited to 'src/empathy-call-window.c')
-rw-r--r--src/empathy-call-window.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index 25fa04c3e..3ea6a3d07 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -650,13 +650,10 @@ empathy_call_window_preview_on_drag_begin_cb (ClutterDragAction *action,
empathy_call_window_show_preview_rectangles (self, TRUE);
}
-static void
-empathy_call_window_preview_on_drag_end_cb (ClutterDragAction *action,
- ClutterActor *actor,
+static PreviewPosition
+empathy_call_window_get_preview_position (EmpathyCallWindow *self,
gfloat event_x,
- gfloat event_y,
- ClutterModifierType modifiers,
- EmpathyCallWindow *self)
+ gfloat event_y)
{
ClutterGeometry box;
PreviewPosition pos = PREVIEW_POS_NONE;
@@ -692,6 +689,21 @@ empathy_call_window_preview_on_drag_end_cb (ClutterDragAction *action,
pos = PREVIEW_POS_BOTTOM_RIGHT;
}
+ return pos;
+}
+
+static void
+empathy_call_window_preview_on_drag_end_cb (ClutterDragAction *action,
+ ClutterActor *actor,
+ gfloat event_x,
+ gfloat event_y,
+ ClutterModifierType modifiers,
+ EmpathyCallWindow *self)
+{
+ PreviewPosition pos;
+
+ pos = empathy_call_window_get_preview_position (self, event_x, event_y);
+
if (pos != PREVIEW_POS_NONE)
empathy_call_window_move_video_preview (self, pos);