summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2018-02-12 15:09:14 -0600
committerDerek Foreman <derekf@osg.samsung.com>2018-04-20 13:00:28 -0500
commit3acd8cdf8045fa908325ebfd6d790557677894e5 (patch)
treeccd8f6d92b2fd6aad3dfd962250fddfe1cd06436 /src
parent36f015cda164c5d158e5dbc484098f7a40529b37 (diff)
efl_ui_win: Remove _elm_win_opaque_update
This stuff is all in the wayland ecore_evas now, so elm no longer needs to handle it.
Diffstat (limited to 'src')
-rw-r--r--src/lib/elementary/efl_ui_win.c56
1 files changed, 1 insertions, 55 deletions
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index f44467cbc3..d5f3518dbf 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -373,7 +373,6 @@ static void _elm_win_frame_add(Efl_Ui_Win_Data *sd, const char *element, const c
373static void _elm_win_frame_style_update(Efl_Ui_Win_Data *sd, Eina_Bool force_emit, Eina_Bool calc); 373static void _elm_win_frame_style_update(Efl_Ui_Win_Data *sd, Eina_Bool force_emit, Eina_Bool calc);
374static inline void _elm_win_need_frame_adjust(Efl_Ui_Win_Data *sd, const char *engine); 374static inline void _elm_win_need_frame_adjust(Efl_Ui_Win_Data *sd, const char *engine);
375static void _elm_win_resize_objects_eval(Evas_Object *obj, Eina_Bool force_resize); 375static void _elm_win_resize_objects_eval(Evas_Object *obj, Eina_Bool force_resize);
376static void _elm_win_opaque_update(Efl_Ui_Win_Data *sd, Eina_Bool force_alpha);
377static void _elm_win_frame_obj_update(Efl_Ui_Win_Data *sd); 376static void _elm_win_frame_obj_update(Efl_Ui_Win_Data *sd);
378 377
379#ifdef HAVE_ELEMENTARY_X 378#ifdef HAVE_ELEMENTARY_X
@@ -449,7 +448,6 @@ _elm_win_apply_alpha(Eo *obj, Efl_Ui_Win_Data *sd)
449 if (!sd->ee) return; 448 if (!sd->ee) return;
450 449
451 enabled = sd->theme_alpha | sd->application_alpha; 450 enabled = sd->theme_alpha | sd->application_alpha;
452 _elm_win_opaque_update(sd, EINA_TRUE);
453 if (sd->img_obj) 451 if (sd->img_obj)
454 { 452 {
455 evas_object_image_alpha_set(sd->img_obj, enabled); 453 evas_object_image_alpha_set(sd->img_obj, enabled);
@@ -966,8 +964,6 @@ _elm_win_resize_job(void *data)
966 evas_object_move(sd->frame_obj, -fx, -fy); 964 evas_object_move(sd->frame_obj, -fx, -fy);
967 evas_object_resize(sd->frame_obj, w + fw, h + fh); 965 evas_object_resize(sd->frame_obj, w + fw, h + fh);
968 } 966 }
969 else
970 _elm_win_opaque_update(sd, 0);
971 967
972 if (sd->main_menu) 968 if (sd->main_menu)
973 { 969 {
@@ -1432,52 +1428,6 @@ _elm_win_profile_update(Efl_Ui_Win_Data *sd)
1432 efl_event_callback_legacy_call(sd->obj, EFL_UI_WIN_EVENT_PROFILE_CHANGED, NULL); 1428 efl_event_callback_legacy_call(sd->obj, EFL_UI_WIN_EVENT_PROFILE_CHANGED, NULL);
1433} 1429}
1434 1430
1435static void
1436_elm_win_opaque_update(Efl_Ui_Win_Data *sd, Eina_Bool force_alpha)
1437{
1438#ifdef HAVE_ELEMENTARY_WL2
1439 int ox, oy, ow, oh;
1440 Eina_Bool alpha;
1441 const char *engine_name;
1442
1443 if (!sd->wl.win) return;
1444 if (!sd->shown) return;
1445
1446 /* If this isn't a wayland window, BAIL now to avoid destroying
1447 * non-wayland engine data structures...
1448 */
1449 engine_name = ecore_evas_engine_name_get(sd->ee);
1450 if (strncmp(engine_name, "wayland", sizeof("wayland") - 1)) return;
1451
1452 alpha = ecore_evas_alpha_get(sd->ee) || force_alpha;
1453 if (sd->fullscreen || !sd->frame_obj)
1454 {
1455 ecore_evas_geometry_get(sd->ee, NULL, NULL, &ow, &oh);
1456 if (!alpha)
1457 ecore_wl2_window_opaque_region_set(sd->wl.win, 0, 0, ow, oh);
1458 else
1459 ecore_wl2_window_opaque_region_set(sd->wl.win, 0, 0, 0, 0);
1460 ecore_wl2_window_geometry_set(sd->wl.win, 0, 0, ow, oh);
1461 ecore_wl2_window_input_region_set(sd->wl.win, 0, 0, ow, oh);
1462 return;
1463 }
1464
1465 edje_object_part_geometry_get(sd->frame_obj, "elm.spacer.opaque",
1466 &ox, &oy, &ow, &oh);
1467 if (!alpha)
1468 ecore_wl2_window_opaque_region_set(sd->wl.win, ox, oy, ow, oh);
1469 else
1470 ecore_wl2_window_opaque_region_set(sd->wl.win, 0, 0, 0, 0);
1471
1472 /* FIXME: Replace with call to ecore_evas_shadow_geometry_set(). */
1473 ecore_wl2_window_geometry_set(sd->wl.win, ox, oy, ow, oh);
1474 ecore_wl2_window_input_region_set(sd->wl.win, ox, oy, ow, oh);
1475#else
1476 (void)sd;
1477 (void)force_alpha;
1478#endif
1479}
1480
1481static inline void 1431static inline void
1482_elm_win_frame_geometry_adjust(Efl_Ui_Win_Data *sd) 1432_elm_win_frame_geometry_adjust(Efl_Ui_Win_Data *sd)
1483{ 1433{
@@ -4459,10 +4409,7 @@ _elm_win_frame_style_update(Efl_Ui_Win_Data *sd, Eina_Bool force_emit, Eina_Bool
4459 { 4409 {
4460 if (!efl_finalized_get(sd->obj)) return; 4410 if (!efl_finalized_get(sd->obj)) return;
4461 if (EINA_LIKELY(sd->type == ELM_WIN_FAKE)) 4411 if (EINA_LIKELY(sd->type == ELM_WIN_FAKE))
4462 { 4412 return;
4463 _elm_win_opaque_update(sd, 0);
4464 return;
4465 }
4466 CRI("Window has no frame object!"); 4413 CRI("Window has no frame object!");
4467 return; 4414 return;
4468 } 4415 }
@@ -4539,7 +4486,6 @@ _elm_win_frame_style_update(Efl_Ui_Win_Data *sd, Eina_Bool force_emit, Eina_Bool
4539 if (calc) 4486 if (calc)
4540 evas_object_smart_calculate(sd->frame_obj); 4487 evas_object_smart_calculate(sd->frame_obj);
4541 _elm_win_frame_obj_update(sd); 4488 _elm_win_frame_obj_update(sd);
4542 _elm_win_opaque_update(sd, EINA_FALSE);
4543 } 4489 }
4544} 4490}
4545 4491