elm_win: fix bug that floating mode set API ignores borderless value 36/123036/1
authorJiyoun Park <jy0703.park@samsung.com>
Mon, 9 Jan 2017 08:15:07 +0000 (17:15 +0900)
committerJiyoun Park <jy0703.park@samsung.com>
Tue, 4 Apr 2017 08:14:47 +0000 (17:14 +0900)
If app calls elm_win_floating_mode_set after elm_win_borderless_set,
it doesn't work correctly.
Because, inside the floating mode set function, it create frame object again.
so only when borderless set is false, floating win can create frame object.

Change-Id: I9f166178388ae40c77d6ff4d38217bd8fbecbd38

src/lib/elm_win.c

index 18f2ecf..c187bb2 100644 (file)
@@ -6593,22 +6593,25 @@ elm_win_floating_mode_set(Evas_Object *obj, Eina_Bool floating)
      {
         if (floating)
           {
-             const char *engine_name = ecore_evas_engine_name_get(sd->ee);
-             Eina_Bool need_frame = engine_name &&
-                ((!strcmp(engine_name, ELM_WAYLAND_SHM)) ||
-                 (!strcmp(engine_name, ELM_WAYLAND_EGL)));
+             if (!sd->borderless)
+               {
+                  const char *engine_name = ecore_evas_engine_name_get(sd->ee);
+                  Eina_Bool need_frame = engine_name &&
+                     ((!strcmp(engine_name, ELM_WAYLAND_SHM)) ||
+                      (!strcmp(engine_name, ELM_WAYLAND_EGL)));
 
-             if (need_frame)
-               need_frame = !sd->fullscreen;
+                  if (need_frame)
+                    need_frame = !sd->fullscreen;
 
-             if (need_frame)
-               {
-                  _elm_win_frame_del(sd);
-                  _elm_win_frame_add(sd, "floating");
-               }
+                  if (need_frame)
+                    {
+                       _elm_win_frame_del(sd);
+                       _elm_win_frame_add(sd, "floating");
+                    }
 
-             if (sd->frame_obj)
-               evas_object_show(sd->frame_obj);
+                  if (sd->frame_obj)
+                    evas_object_show(sd->frame_obj);
+               }
 
              //TIZEN_ONLY(20161208): supported floating window
              edje_object_signal_emit(sd->edje, "elm,state,floating,on", "elm");