simplify code for moving windows to other desks: add effect unclipping to e_border_de...
authorMike Blumenkrantz <zmike@samsung.com>
Thu, 28 Nov 2013 14:43:20 +0000 (09:43 -0500)
committerMike Blumenkrantz <zmike@samsung.com>
Thu, 28 Nov 2013 14:43:20 +0000 (09:43 -0500)
src/bin/e_border.c
src/bin/e_int_border_menu.c
src/modules/pager/e_mod_main.c

index 40ee0cf..5a272cb 100644 (file)
@@ -926,6 +926,14 @@ e_border_desk_set(E_Border *bd,
           }
      }
 #endif
+   if (desk == e_desk_current_get(desk->zone))
+     {
+        e_comp_win_effect_unclip(bd->cw);
+        e_comp_win_effect_set(bd->cw, NULL);
+        e_border_show(bd);
+     }
+   else
+     e_border_hide(bd, 2);
    ecore_x_window_shadow_tree_flush();
    if (bd->fullscreen)
      {
index 31238f2..2dc9419 100644 (file)
@@ -1002,17 +1002,7 @@ _e_border_menu_cb_sendto(void *data, E_Menu *m, E_Menu_Item *mi __UNUSED__)
    desk = data;
    bd = e_object_data_get(E_OBJECT(m));
    if ((bd) && (desk))
-     {
-         if (desk != e_desk_current_get(desk->zone))
-           e_border_hide(bd, 2);
-         else
-           {
-              e_comp_win_effect_unclip(bd->cw);
-              e_comp_win_effect_set(bd->cw, NULL);
-              e_border_show(bd);
-           }
-        e_border_desk_set(bd, desk);
-     }
+     e_border_desk_set(bd, desk);
 }
 
 static void
index 11ac17f..f69b11e 100644 (file)
@@ -1910,14 +1910,6 @@ _pager_window_cb_mouse_move(void *data, Evas *e __UNUSED__, Evas_Object *obj __U
              if (pd != pw->desk)
                {
                   edje_object_signal_emit(pw->desk->o_desk, "e,action,drag,out", "e");
-                  if (pd->desk != e_desk_current_get(pd->desk->zone))
-                    e_border_hide(pw->border, 2);
-                  else
-                    {
-                       e_comp_win_effect_unclip(pw->border->cw);
-                       e_comp_win_effect_set(pw->border->cw, NULL);
-                       e_border_show(pw->border);
-                    }
                   e_border_desk_set(pw->border, pd->desk);
                   edje_object_signal_emit(pd->o_desk, "e,action,drag,in", "e");
                   pd->pager->active_drop_pd = pd;