diff options
author | Mike Blumenkrantz <zmike@osg.samsung.com> | 2017-08-04 16:08:42 -0400 |
---|---|---|
committer | Mike Blumenkrantz <zmike@osg.samsung.com> | 2017-10-25 10:44:16 -0400 |
commit | ffac7fc539f644439b35f7f360b8cad3578ecfc3 (patch) | |
tree | 4c86181fac4441a85febf5ec4aa1566be46191fe /src/lib/elementary | |
parent | 4f8a9b50f405bad270a6ec37cf8c064ba408f86e (diff) |
wayland: fix window stack implementation
ref T5350
Diffstat (limited to 'src/lib/elementary')
-rw-r--r-- | src/lib/elementary/efl_ui_win.c | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index 14e34b8313..77205592c1 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c | |||
@@ -3105,7 +3105,19 @@ _elm_ee_wlwin_get(const Ecore_Evas *ee) | |||
3105 | static void | 3105 | static void |
3106 | _elm_win_wlwindow_get(Efl_Ui_Win_Data *sd) | 3106 | _elm_win_wlwindow_get(Efl_Ui_Win_Data *sd) |
3107 | { | 3107 | { |
3108 | Ecore_Wl2_Window *pwin = sd->wl.win; | ||
3108 | sd->wl.win = _elm_ee_wlwin_get(sd->ee); | 3109 | sd->wl.win = _elm_ee_wlwin_get(sd->ee); |
3110 | if (sd->wl.win != pwin) | ||
3111 | { | ||
3112 | char buf[128]; | ||
3113 | int id; | ||
3114 | |||
3115 | snprintf(buf, sizeof(buf), "%u||%p", getpid(), sd->wl.win); | ||
3116 | eina_stringshare_replace(&sd->stack_id, buf); | ||
3117 | id = ecore_evas_aux_hint_id_get(sd->ee, "stack_id"); | ||
3118 | if (id >= 0) ecore_evas_aux_hint_val_set(sd->ee, id, sd->stack_id); | ||
3119 | else ecore_evas_aux_hint_add(sd->ee, "stack_id", sd->stack_id); | ||
3120 | } | ||
3109 | } | 3121 | } |
3110 | 3122 | ||
3111 | void | 3123 | void |
@@ -5037,6 +5049,7 @@ _elm_win_finalize_internal(Eo *obj, Efl_Ui_Win_Data *sd, const char *name, Elm_W | |||
5037 | { | 5049 | { |
5038 | case ELM_WIN_BASIC: | 5050 | case ELM_WIN_BASIC: |
5039 | case ELM_WIN_DIALOG_BASIC: | 5051 | case ELM_WIN_DIALOG_BASIC: |
5052 | case ELM_WIN_NAVIFRAME_BASIC: | ||
5040 | case ELM_WIN_SPLASH: | 5053 | case ELM_WIN_SPLASH: |
5041 | case ELM_WIN_TOOLBAR: | 5054 | case ELM_WIN_TOOLBAR: |
5042 | case ELM_WIN_UTILITY: | 5055 | case ELM_WIN_UTILITY: |
@@ -6433,7 +6446,15 @@ _efl_ui_win_stack_master_id_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, const | |||
6433 | eina_stringshare_replace(&(sd->stack_master_id), id); | 6446 | eina_stringshare_replace(&(sd->stack_master_id), id); |
6434 | #ifdef HAVE_ELEMENTARY_X | 6447 | #ifdef HAVE_ELEMENTARY_X |
6435 | if (sd->x.xwin) _elm_win_xwin_update(sd); | 6448 | if (sd->x.xwin) _elm_win_xwin_update(sd); |
6449 | else | ||
6436 | #endif | 6450 | #endif |
6451 | { | ||
6452 | int num = ecore_evas_aux_hint_id_get(sd->ee, "stack_master_id"); | ||
6453 | if (num >= 0) | ||
6454 | ecore_evas_aux_hint_val_set(sd->ee, num, id); | ||
6455 | else | ||
6456 | ecore_evas_aux_hint_add(sd->ee, "stack_master_id", id); | ||
6457 | } | ||
6437 | } | 6458 | } |
6438 | 6459 | ||
6439 | EOLIAN static const char * | 6460 | EOLIAN static const char * |
@@ -6445,8 +6466,14 @@ _efl_ui_win_stack_master_id_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd) | |||
6445 | EOLIAN static void | 6466 | EOLIAN static void |
6446 | _efl_ui_win_stack_base_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eina_Bool base) | 6467 | _efl_ui_win_stack_base_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eina_Bool base) |
6447 | { | 6468 | { |
6469 | int num; | ||
6448 | if (sd->shown) return; | 6470 | if (sd->shown) return; |
6449 | sd->stack_base = !!base; | 6471 | sd->stack_base = !!base; |
6472 | num = ecore_evas_aux_hint_id_get(sd->ee, "stack_base"); | ||
6473 | if (num >= 0) | ||
6474 | ecore_evas_aux_hint_val_set(sd->ee, num, sd->stack_base ? "1" : "0"); | ||
6475 | else | ||
6476 | ecore_evas_aux_hint_add(sd->ee, "stack_base", sd->stack_base ? "1" : "0"); | ||
6450 | } | 6477 | } |
6451 | 6478 | ||
6452 | EOLIAN static Eina_Bool | 6479 | EOLIAN static Eina_Bool |
@@ -6517,8 +6544,13 @@ _efl_ui_win_stack_pop_to(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd) | |||
6517 | } | 6544 | } |
6518 | ecore_x_ungrab(); | 6545 | ecore_x_ungrab(); |
6519 | } | 6546 | } |
6547 | else | ||
6520 | #endif | 6548 | #endif |
6521 | // wayland - needs to be a special compositor request | 6549 | { |
6550 | int num = ecore_evas_aux_hint_id_get(sd->ee, "stack_pop_to"); | ||
6551 | if (num >= 0) ecore_evas_aux_hint_val_set(sd->ee, num, "1"); | ||
6552 | else ecore_evas_aux_hint_add(sd->ee, "stack_pop_to", "1"); | ||
6553 | } | ||
6522 | // win32/osx ? | 6554 | // win32/osx ? |
6523 | } | 6555 | } |
6524 | 6556 | ||