aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-08-10 17:32:09 +0800
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-08-15 19:14:55 +0800
commit724eac592d90da4e169adb7b675845650d9d770b (patch)
treee97e5f312638e8bbe67ad47cbbaa33a4adedcf40 /src
parentca2cb730d68620a638ef41d09cd25984e6cb4008 (diff)
downloadgsoc2013-empathy-724eac592d90da4e169adb7b675845650d9d770b.tar
gsoc2013-empathy-724eac592d90da4e169adb7b675845650d9d770b.tar.gz
gsoc2013-empathy-724eac592d90da4e169adb7b675845650d9d770b.tar.bz2
gsoc2013-empathy-724eac592d90da4e169adb7b675845650d9d770b.tar.lz
gsoc2013-empathy-724eac592d90da4e169adb7b675845650d9d770b.tar.xz
gsoc2013-empathy-724eac592d90da4e169adb7b675845650d9d770b.tar.zst
gsoc2013-empathy-724eac592d90da4e169adb7b675845650d9d770b.zip
Don't darken the preview when dragging it
https://bugzilla.gnome.org/show_bug.cgi?id=656268
Diffstat (limited to 'src')
-rw-r--r--src/empathy-call-window.c33
1 files changed, 25 insertions, 8 deletions
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index 78ff5cb57..5e15fba70 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -170,6 +170,7 @@ struct _EmpathyCallWindowPriv
ClutterLayoutManager *video_layout;
/* Coordinates of the preview drag event's start. */
+ PreviewPosition preview_pos;
gfloat event_x;
gfloat event_y;
@@ -681,6 +682,8 @@ empathy_call_window_move_video_preview (EmpathyCallWindow *self,
DEBUG ("moving the video preview to %d", pos);
+ self->priv->preview_pos = pos;
+
switch (pos)
{
case PREVIEW_POS_TOP_LEFT:
@@ -737,17 +740,29 @@ empathy_call_window_darken_preview_rectangle (EmpathyCallWindow *self,
static void
empathy_call_window_darken_preview_rectangles (EmpathyCallWindow *self)
{
- empathy_call_window_darken_preview_rectangle (self,
- self->priv->preview_rectangle1);
+ ClutterActor *rectangle;
+
+ rectangle = empathy_call_window_get_preview_rectangle (self,
+ self->priv->preview_pos);
- empathy_call_window_darken_preview_rectangle (self,
- self->priv->preview_rectangle2);
+ /* We don't want to darken the rectangle where the preview
+ * currently is. */
- empathy_call_window_darken_preview_rectangle (self,
- self->priv->preview_rectangle3);
+ if (self->priv->preview_rectangle1 != rectangle)
+ empathy_call_window_darken_preview_rectangle (self,
+ self->priv->preview_rectangle1);
- empathy_call_window_darken_preview_rectangle (self,
- self->priv->preview_rectangle4);
+ if (self->priv->preview_rectangle2 != rectangle)
+ empathy_call_window_darken_preview_rectangle (self,
+ self->priv->preview_rectangle2);
+
+ if (self->priv->preview_rectangle3 != rectangle)
+ empathy_call_window_darken_preview_rectangle (self,
+ self->priv->preview_rectangle3);
+
+ if (self->priv->preview_rectangle4 != rectangle)
+ empathy_call_window_darken_preview_rectangle (self,
+ self->priv->preview_rectangle4);
}
static void
@@ -911,6 +926,8 @@ create_video_preview (EmpathyCallWindow *self)
CLUTTER_BIN_ALIGNMENT_START,
CLUTTER_BIN_ALIGNMENT_END);
+ self->priv->preview_pos = PREVIEW_POS_BOTTOM_LEFT;
+
clutter_actor_hide (priv->preview_hidden_button);
g_signal_connect (button, "clicked",