struct zxdg_positioner_v6 *pos;
EINA_SAFETY_ON_NULL_RETURN(win->parent);
- EINA_SAFETY_ON_NULL_RETURN(win->grab);
pos = zxdg_shell_v6_create_positioner(win->display->wl.zxdg_shell);
if (!pos) return;
win->parent->zxdg_surface, pos);
zxdg_positioner_v6_destroy(pos);
- zxdg_popup_v6_grab(win->zxdg_popup, win->grab->wl.seat,
- wl_display_get_serial(win->display->wl.display));
+ if (win->grab)
+ zxdg_popup_v6_grab(win->zxdg_popup, win->grab->wl.seat,
+ wl_display_get_serial(win->display->wl.display));
zxdg_popup_v6_set_user_data(win->zxdg_popup, win);
zxdg_popup_v6_add_listener(win->zxdg_popup, &_zxdg_popup_listener, win);
if (ptop)
zxdg_toplevel_v6_set_parent(win->zxdg_toplevel, ptop);
}
- else if (win->xdg_surface)
- xdg_surface_set_parent(win->xdg_surface, NULL);
break;
default:
break;
zxdg_surface_v6_add_listener(window->zxdg_surface,
&_zxdg_surface_listener, window);
- window->zxdg_toplevel =
- zxdg_surface_v6_get_toplevel(window->zxdg_surface);
- zxdg_toplevel_v6_set_user_data(window->zxdg_toplevel, window);
- zxdg_toplevel_v6_add_listener(window->zxdg_toplevel,
- &_zxdg_toplevel_listener, window);
-
- if (window->title)
- zxdg_toplevel_v6_set_title(window->zxdg_toplevel, window->title);
- if (window->class)
- zxdg_toplevel_v6_set_app_id(window->zxdg_toplevel, window->class);
-
- window->zxdg_set_min_size = zxdg_toplevel_v6_set_min_size;
- window->zxdg_set_max_size = zxdg_toplevel_v6_set_max_size;
-
window->zxdg_configure_ack = zxdg_surface_v6_ack_configure;
- _ecore_wl2_window_type_set(window);
-
window->pending.configure = EINA_TRUE;
- if (window->maximized)
- zxdg_toplevel_v6_set_maximized(window->zxdg_toplevel);
-
- if (window->fullscreen)
- zxdg_toplevel_v6_set_fullscreen(window->zxdg_toplevel, NULL);
- if (window->aspect.set && window->display->wl.efl_hints)
- efl_hints_set_aspect(window->display->wl.efl_hints, window->zxdg_toplevel,
- window->aspect.w, window->aspect.h, window->aspect.aspect);
+ if (window->type == ECORE_WL2_WINDOW_TYPE_MENU)
+ _ecore_wl2_window_zxdg_popup_create(window);
+ else
+ {
+ window->zxdg_toplevel =
+ zxdg_surface_v6_get_toplevel(window->zxdg_surface);
+ zxdg_toplevel_v6_set_user_data(window->zxdg_toplevel, window);
+ zxdg_toplevel_v6_add_listener(window->zxdg_toplevel,
+ &_zxdg_toplevel_listener, window);
+
+ if (window->title)
+ zxdg_toplevel_v6_set_title(window->zxdg_toplevel, window->title);
+ if (window->class)
+ zxdg_toplevel_v6_set_app_id(window->zxdg_toplevel, window->class);
+
+ window->zxdg_set_min_size = zxdg_toplevel_v6_set_min_size;
+ window->zxdg_set_max_size = zxdg_toplevel_v6_set_max_size;
+
+ {
+ struct zxdg_toplevel_v6 *ptop = NULL;
+
+ if (window->parent)
+ ptop = window->parent->zxdg_toplevel;
+
+ if (ptop)
+ zxdg_toplevel_v6_set_parent(window->zxdg_toplevel, ptop);
+ }
+
+ if (window->maximized)
+ zxdg_toplevel_v6_set_maximized(window->zxdg_toplevel);
+
+ if (window->fullscreen)
+ zxdg_toplevel_v6_set_fullscreen(window->zxdg_toplevel, NULL);
+ if (window->aspect.set && window->display->wl.efl_hints)
+ efl_hints_set_aspect(window->display->wl.efl_hints, window->zxdg_toplevel,
+ window->aspect.w, window->aspect.h, window->aspect.aspect);
+ }
wl_surface_commit(window->surface);
}
}
if ((sd->type == ELM_WIN_INLINED_IMAGE) ||
- (sd->type == ELM_WIN_SOCKET_IMAGE))
+ (sd->type == ELM_WIN_SOCKET_IMAGE) ||
+ (sd->type == ELM_WIN_TOOLTIP) ||
+ (sd->type == ELM_WIN_COMBO) ||
+ (sd->type == ELM_WIN_MENU) ||
+ (sd->type == ELM_WIN_POPUP_MENU))
{
sd->csd.need_shadow = EINA_FALSE;
sd->csd.need_borderless = EINA_TRUE;
Eina_Stringshare *accel = NULL;
Eina_Bool is_gl_accel;
int i, p = 0;
+ int parent_id = 0;
Efl_Ui_Win_Data tmp_sd;
#endif
}
}
+ if (parent) parent_id = elm_win_window_id_get(parent);
for (i = 0; i < p; i++)
{
if (!strcmp(enginelist[i], ELM_SOFTWARE_X11))
tmp_sd.ee = ecore_evas_gl_x11_new(NULL, 0, 0, 0, 0, 0);
}
else if (!strcmp(enginelist[i], ELM_WAYLAND_SHM))
- tmp_sd.ee = ecore_evas_wayland_shm_new(NULL, 0, 0, 0, 0, 0, 0);
+ tmp_sd.ee = ecore_evas_wayland_shm_new(NULL, parent_id, 0, 0, 0, 0, 0);
else if (!strcmp(enginelist[i], ELM_WAYLAND_EGL))
- tmp_sd.ee = ecore_evas_wayland_egl_new(NULL, 0, 0, 0, 0, 0, 0);
+ tmp_sd.ee = ecore_evas_wayland_egl_new(NULL, parent_id, 0, 0, 0, 0, 0);
else if (!strcmp(enginelist[i], ELM_SOFTWARE_WIN32))
tmp_sd.ee = ecore_evas_software_gdi_new(NULL, 0, 0, 1, 1);
else if (!strcmp(enginelist[i], ELM_SOFTWARE_DDRAW))