summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/elementary/elm_win.c62
1 files changed, 32 insertions, 30 deletions
diff --git a/src/lib/elementary/elm_win.c b/src/lib/elementary/elm_win.c
index 9890401..04bed5a 100644
--- a/src/lib/elementary/elm_win.c
+++ b/src/lib/elementary/elm_win.c
@@ -301,6 +301,8 @@ _elm_win_on_resize_obj_changed_size_hints(void *data,
301static void 301static void
302_elm_win_img_callbacks_del(Evas_Object *obj, Evas_Object *imgobj); 302_elm_win_img_callbacks_del(Evas_Object *obj, Evas_Object *imgobj);
303static Eina_Bool _elm_win_theme_internal(Eo *obj, Elm_Win_Data *sd); 303static Eina_Bool _elm_win_theme_internal(Eo *obj, Elm_Win_Data *sd);
304static void _elm_win_frame_add(Elm_Win_Data *sd, const char *style);
305static void _elm_win_frame_del(Elm_Win_Data *sd);
304 306
305#ifdef HAVE_ELEMENTARY_X 307#ifdef HAVE_ELEMENTARY_X
306static void _elm_win_xwin_update(Elm_Win_Data *sd); 308static void _elm_win_xwin_update(Elm_Win_Data *sd);
@@ -1411,24 +1413,44 @@ _elm_win_state_change(Ecore_Evas *ee)
1411 } 1413 }
1412 if (ch_fullscreen) 1414 if (ch_fullscreen)
1413 { 1415 {
1414 _elm_win_frame_obj_update(sd); 1416 const char *engine_name = ecore_evas_engine_name_get(sd->ee);
1417 Eina_Bool need_frame = eina_streq(engine_name, ELM_WAYLAND_SHM) ||
1418 eina_streq(engine_name, ELM_WAYLAND_EGL);
1419 if (need_frame)
1420 {
1421 if ((!sd->fullscreen) && (!sd->frame_obj))
1422 {
1423 _elm_win_frame_add(sd, "default");
1424 evas_object_show(sd->frame_obj);
1425 }
1426 else if (sd->fullscreen && sd->frame_obj)
1427 _elm_win_frame_del(sd);
1428 }
1429
1415 if (sd->fullscreen) 1430 if (sd->fullscreen)
1416 { 1431 {
1417 int w, h; 1432 int w, h;
1418 1433#ifdef HAVE_ELEMENTARY_WL2
1434 if (need_frame)
1435 {
1436 _elm_win_opaque_update(sd);
1437 sd->wl.opaque_dirty = 1;
1438 }
1439#endif
1419 eo_event_callback_call 1440 eo_event_callback_call
1420 (obj, ELM_WIN_EVENT_FULLSCREEN, NULL); 1441 (obj, ELM_WIN_EVENT_FULLSCREEN, NULL);
1421 if (sd->frame_obj)
1422 evas_object_hide(sd->frame_obj);
1423 ecore_evas_geometry_get(sd->ee, NULL, NULL, &w, &h);
1424 ecore_evas_resize(sd->ee, w, h);
1425 } 1442 }
1426 else 1443 else
1427 { 1444 {
1445#ifdef HAVE_ELEMENTARY_WL2
1446 if (need_frame)
1447 {
1448 _elm_win_opaque_update(sd);
1449 _elm_win_frame_obj_update(sd);
1450 }
1451#endif
1428 eo_event_callback_call 1452 eo_event_callback_call
1429 (obj, ELM_WIN_EVENT_UNFULLSCREEN, NULL); 1453 (obj, ELM_WIN_EVENT_UNFULLSCREEN, NULL);
1430 if (sd->frame_obj)
1431 evas_object_show(sd->frame_obj);
1432 } 1454 }
1433 } 1455 }
1434 if (ch_maximized) 1456 if (ch_maximized)
@@ -3054,13 +3076,13 @@ _elm_win_frame_pre_render(void *data, Evas *e EINA_UNUSED, void *ev EINA_UNUSED)
3054#endif 3076#endif
3055 3077
3056static void 3078static void
3057_elm_win_frame_add(Elm_Win_Data *sd, 3079_elm_win_frame_add(Elm_Win_Data *sd, const char *style)
3058 const char *style)
3059{ 3080{
3060 Evas_Object *obj = sd->obj; 3081 Evas_Object *obj = sd->obj;
3061 int w, h, mw, mh; 3082 int w, h, mw, mh;
3062 short layer; 3083 short layer;
3063 3084
3085 if (sd->frame_obj) return;
3064 sd->frame_obj = edje_object_add(sd->evas); 3086 sd->frame_obj = edje_object_add(sd->evas);
3065 layer = evas_object_layer_get(obj); 3087 layer = evas_object_layer_get(obj);
3066 evas_object_layer_set(sd->frame_obj, layer + 1); 3088 evas_object_layer_set(sd->frame_obj, layer + 1);
@@ -4370,28 +4392,8 @@ _elm_win_fullscreen_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, Eina_Bool fullscr
4370 else 4392 else
4371 { 4393 {
4372// sd->fullscreen = fullscreen; 4394// sd->fullscreen = fullscreen;
4373 Eina_Bool need_frame = engine_name &&
4374 ((!strcmp(engine_name, ELM_WAYLAND_SHM)) ||
4375 (!strcmp(engine_name, ELM_WAYLAND_EGL)));
4376
4377 if (need_frame)
4378 need_frame = !ecore_evas_borderless_get(sd->ee);
4379
4380 TRAP(sd, fullscreen_set, fullscreen); 4395 TRAP(sd, fullscreen_set, fullscreen);
4381 4396
4382 if (fullscreen)
4383 {
4384 if (need_frame)
4385 _elm_win_frame_del(sd);
4386 }
4387 else
4388 {
4389 if (need_frame)
4390 _elm_win_frame_add(sd, "default");
4391
4392 if (sd->frame_obj)
4393 evas_object_show(sd->frame_obj);
4394 }
4395#ifdef HAVE_ELEMENTARY_X 4397#ifdef HAVE_ELEMENTARY_X
4396 _elm_win_xwin_update(sd); 4398 _elm_win_xwin_update(sd);
4397#endif 4399#endif