From: Jiyoun Park Date: Mon, 9 Jan 2017 08:15:07 +0000 (+0900) Subject: elm_win: fix bug that floating mode set API ignores borderless value X-Git-Tag: submit/tizen/20170406.055746~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d6e09beb7aaa38725dff83a28aef83f246caba80;p=platform%2Fupstream%2Felementary.git elm_win: fix bug that floating mode set API ignores borderless value 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 --- diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c index 18f2ecf..c187bb2 100644 --- a/src/lib/elm_win.c +++ b/src/lib/elm_win.c @@ -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");