e_client: floating win's moving out of margin is limited during rotation 77/117277/1
authorGwanglim Lee <gl77.lee@samsung.com>
Fri, 3 Mar 2017 13:01:11 +0000 (22:01 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Fri, 3 Mar 2017 13:01:11 +0000 (22:01 +0900)
Change-Id: I53266b9c42f21c02f9b21578226d438d7c00e1ab

src/bin/e_client.c
src/bin/e_client.h

index 1e4731296bc74e3a87a3886c092bfdd0a8cd3bf2..0af3f9bd64372167d66c4c7366d6d37044b96e15 100644 (file)
@@ -4102,6 +4102,21 @@ e_client_mouse_up(E_Client *ec, int button, Evas_Point *output, E_Binding_Event_
    ec->drag.start = 0;
 }
 
+E_API void
+e_client_stay_within_canvas_margin(E_Client *ec)
+{
+   int new_x = ec->x;
+   int new_y = ec->y;
+
+   if (ec->floating)
+     {
+        _e_client_stay_within_canvas_margin(ec, ec->x, ec->y, &new_x, &new_y);
+
+        if ((ec->x != new_x) || (ec->y != new_y))
+          evas_object_move(ec->frame, new_x, new_y);
+     }
+}
+
 E_API void
 e_client_mouse_move(E_Client *ec, Evas_Point *output)
 {
index 14ad3b76aec57a19542ea6bf04c1106740521dd7..ef6bedde313124bcb028e504d38c7880aee583cf 100644 (file)
@@ -1109,6 +1109,8 @@ E_API void e_remember_del(void *rem); /* TODO: should be removed */
 
 E_API void e_client_visibility_force_obscured_set(E_Client *ec, Eina_Bool set);
 
+E_API void e_client_stay_within_canvas_margin(E_Client *ec);
+
 /**
  * Move window to coordinates that do not account client decorations yet.
  *
@@ -1155,6 +1157,7 @@ e_client_util_resize_without_frame(E_Client *ec, int w, int h)
    if (!ec) return;
    e_comp_object_frame_wh_adjust(ec->frame, w, h, &w, &h);
    evas_object_resize(ec->frame, w, h);
+   e_client_stay_within_canvas_margin(ec);
 }
 
 /**