forked from enlightenment/efl
wayland: Fix elementary setting window parents at creation time
Summary: We need to pass the entire pointer, not just 32-bits of it. Fixes a crash with enlightenment sandbox gadgets where ecore_wl2_window_alpha_get() is called with an invalid pointer while trying to display a pop-up. Reviewers: zmike, devilhorns Reviewed By: zmike, devilhorns Subscribers: devilhorns, cedric, #reviewers, #committers, zmike Tags: #efl Differential Revision: https://phab.enlightenment.org/D6775
This commit is contained in:
parent
a7f65c75d9
commit
e382bac1a0
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
#define ECORE_EVAS_INTERNAL
|
#define ECORE_EVAS_INTERNAL
|
||||||
#define EFL_INPUT_EVENT_PROTECTED
|
#define EFL_INPUT_EVENT_PROTECTED
|
||||||
|
#define IPA_YLNO_ESU_LANRETNI_MLE
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -4339,7 +4340,53 @@ ecore_evas_wayland_shm_new(const char *disp_name, unsigned int parent,
|
||||||
int x, int y, int w, int h, Eina_Bool frame)
|
int x, int y, int w, int h, Eina_Bool frame)
|
||||||
{
|
{
|
||||||
Ecore_Evas *ee;
|
Ecore_Evas *ee;
|
||||||
Ecore_Evas *(*new)(const char *, unsigned int, int, int, int, int, Eina_Bool);
|
Ecore_Evas *(*new)(const char *, Ecore_Window, int, int, int, int, Eina_Bool);
|
||||||
|
Eina_Module *m = _ecore_evas_engine_load("wayland");
|
||||||
|
EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL);
|
||||||
|
|
||||||
|
new = eina_module_symbol_get(m, "ecore_evas_wayland_shm_new_internal");
|
||||||
|
EINA_SAFETY_ON_NULL_RETURN_VAL(new, NULL);
|
||||||
|
|
||||||
|
if (parent) ERR("Wayland windows with parents not supported through legacy API");
|
||||||
|
|
||||||
|
ee = new(disp_name, 0, x, y, w, h, frame);
|
||||||
|
if (!_ecore_evas_cursors_init(ee))
|
||||||
|
{
|
||||||
|
ecore_evas_free(ee);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
return ee;
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI Ecore_Evas *
|
||||||
|
ecore_evas_wayland_egl_new(const char *disp_name, unsigned int parent,
|
||||||
|
int x, int y, int w, int h, Eina_Bool frame)
|
||||||
|
{
|
||||||
|
Ecore_Evas *ee;
|
||||||
|
Ecore_Evas *(*new)(const char *, Ecore_Window, int, int, int, int, Eina_Bool);
|
||||||
|
Eina_Module *m = _ecore_evas_engine_load("wayland");
|
||||||
|
EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL);
|
||||||
|
|
||||||
|
new = eina_module_symbol_get(m, "ecore_evas_wayland_egl_new_internal");
|
||||||
|
EINA_SAFETY_ON_NULL_RETURN_VAL(new, NULL);
|
||||||
|
|
||||||
|
if (parent) ERR("Wayland windows with parents not supported through legacy API");
|
||||||
|
|
||||||
|
ee = new(disp_name, 0, x, y, w, h, frame);
|
||||||
|
if (!_ecore_evas_cursors_init(ee))
|
||||||
|
{
|
||||||
|
ecore_evas_free(ee);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
return ee;
|
||||||
|
}
|
||||||
|
|
||||||
|
Ecore_Evas *
|
||||||
|
_wayland_shm_new(const char *disp_name, Ecore_Window parent,
|
||||||
|
int x, int y, int w, int h, Eina_Bool frame)
|
||||||
|
{
|
||||||
|
Ecore_Evas *ee;
|
||||||
|
Ecore_Evas *(*new)(const char *, Ecore_Window, int, int, int, int, Eina_Bool);
|
||||||
Eina_Module *m = _ecore_evas_engine_load("wayland");
|
Eina_Module *m = _ecore_evas_engine_load("wayland");
|
||||||
EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL);
|
EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL);
|
||||||
|
|
||||||
|
@ -4355,12 +4402,12 @@ ecore_evas_wayland_shm_new(const char *disp_name, unsigned int parent,
|
||||||
return ee;
|
return ee;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Ecore_Evas *
|
Ecore_Evas *
|
||||||
ecore_evas_wayland_egl_new(const char *disp_name, unsigned int parent,
|
_wayland_egl_new(const char *disp_name, Ecore_Window parent,
|
||||||
int x, int y, int w, int h, Eina_Bool frame)
|
int x, int y, int w, int h, Eina_Bool frame)
|
||||||
{
|
{
|
||||||
Ecore_Evas *ee;
|
Ecore_Evas *ee;
|
||||||
Ecore_Evas *(*new)(const char *, unsigned int, int, int, int, int, Eina_Bool);
|
Ecore_Evas *(*new)(const char *, Ecore_Window, int, int, int, int, Eina_Bool);
|
||||||
Eina_Module *m = _ecore_evas_engine_load("wayland");
|
Eina_Module *m = _ecore_evas_engine_load("wayland");
|
||||||
EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL);
|
EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL);
|
||||||
|
|
||||||
|
|
|
@ -490,6 +490,14 @@ EAPI Eina_Bool ecore_evas_render(Ecore_Evas *ee);
|
||||||
EAPI Evas *ecore_evas_evas_new(Ecore_Evas *ee, int w, int h);
|
EAPI Evas *ecore_evas_evas_new(Ecore_Evas *ee, int w, int h);
|
||||||
EAPI void ecore_evas_done(Ecore_Evas *ee, Eina_Bool single_window);
|
EAPI void ecore_evas_done(Ecore_Evas *ee, Eina_Bool single_window);
|
||||||
|
|
||||||
|
#ifdef IPA_YLNO_ESU_LANRETNI_MLE
|
||||||
|
EAPI Ecore_Evas *_wayland_shm_new(const char *disp_name, Ecore_Window parent, int x, int y, int w, int h, Eina_Bool frame);
|
||||||
|
EAPI Ecore_Evas *_wayland_egl_new(const char *disp_name, Ecore_Window parent, int x, int y, int w, int h, Eina_Bool frame);
|
||||||
|
#else
|
||||||
|
#define _wayland_shm_new DONT_USE_INTERNAL_API
|
||||||
|
#define _wayland_egl_new DONT_USE_INTERNAL_API
|
||||||
|
#endif
|
||||||
|
|
||||||
static inline Eina_Bool
|
static inline Eina_Bool
|
||||||
ecore_evas_render_prepare(Ecore_Evas *ee)
|
ecore_evas_render_prepare(Ecore_Evas *ee)
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
#define EFL_CANVAS_SCENE_BETA
|
#define EFL_CANVAS_SCENE_BETA
|
||||||
#define EFL_UI_WIDGET_FOCUS_MANAGER_PROTECTED
|
#define EFL_UI_WIDGET_FOCUS_MANAGER_PROTECTED
|
||||||
#define EFL_PART_PROTECTED
|
#define EFL_PART_PROTECTED
|
||||||
|
#define IPA_YLNO_ESU_LANRETNI_MLE
|
||||||
|
|
||||||
#include <Elementary.h>
|
#include <Elementary.h>
|
||||||
#include <Elementary_Cursor.h>
|
#include <Elementary_Cursor.h>
|
||||||
|
@ -4953,7 +4954,7 @@ _elm_win_finalize_internal(Eo *obj, Efl_Ui_Win_Data *sd, const char *name, Efl_U
|
||||||
Eina_Stringshare *accel = NULL;
|
Eina_Stringshare *accel = NULL;
|
||||||
Eina_Bool is_gl_accel;
|
Eina_Bool is_gl_accel;
|
||||||
int i, p = 0;
|
int i, p = 0;
|
||||||
int parent_id = 0;
|
Ecore_Window parent_id = 0;
|
||||||
|
|
||||||
Efl_Ui_Win_Data tmp_sd;
|
Efl_Ui_Win_Data tmp_sd;
|
||||||
|
|
||||||
|
@ -5254,9 +5255,9 @@ _elm_win_finalize_internal(Eo *obj, Efl_Ui_Win_Data *sd, const char *name, Efl_U
|
||||||
tmp_sd.ee = ecore_evas_gl_x11_new(NULL, 0, 0, 0, 0, 0);
|
tmp_sd.ee = ecore_evas_gl_x11_new(NULL, 0, 0, 0, 0, 0);
|
||||||
}
|
}
|
||||||
else if (!strcmp(enginelist[i], ELM_WAYLAND_SHM))
|
else if (!strcmp(enginelist[i], ELM_WAYLAND_SHM))
|
||||||
tmp_sd.ee = ecore_evas_wayland_shm_new(NULL, parent_id, 0, 0, 0, 0, 0);
|
tmp_sd.ee = _wayland_shm_new(NULL, parent_id, 0, 0, 0, 0, 0);
|
||||||
else if (!strcmp(enginelist[i], ELM_WAYLAND_EGL))
|
else if (!strcmp(enginelist[i], ELM_WAYLAND_EGL))
|
||||||
tmp_sd.ee = ecore_evas_wayland_egl_new(NULL, parent_id, 0, 0, 0, 0, 0);
|
tmp_sd.ee = _wayland_egl_new(NULL, parent_id, 0, 0, 0, 0, 0);
|
||||||
else if (!strcmp(enginelist[i], ELM_SOFTWARE_WIN32))
|
else if (!strcmp(enginelist[i], ELM_SOFTWARE_WIN32))
|
||||||
tmp_sd.ee = ecore_evas_software_gdi_new(NULL, 0, 0, 1, 1);
|
tmp_sd.ee = ecore_evas_software_gdi_new(NULL, 0, 0, 1, 1);
|
||||||
else if (!strcmp(enginelist[i], ELM_SOFTWARE_DDRAW))
|
else if (!strcmp(enginelist[i], ELM_SOFTWARE_DDRAW))
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
/* external functions */
|
/* external functions */
|
||||||
EAPI Ecore_Evas *
|
EAPI Ecore_Evas *
|
||||||
ecore_evas_wayland_egl_new_internal(const char *disp_name, unsigned int parent, int x, int y, int w, int h, Eina_Bool frame)
|
ecore_evas_wayland_egl_new_internal(const char *disp_name, Ecore_Window parent, int x, int y, int w, int h, Eina_Bool frame)
|
||||||
{
|
{
|
||||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
/* external functions */
|
/* external functions */
|
||||||
EAPI Ecore_Evas *
|
EAPI Ecore_Evas *
|
||||||
ecore_evas_wayland_shm_new_internal(const char *disp_name, unsigned int parent, int x, int y, int w, int h, Eina_Bool frame)
|
ecore_evas_wayland_shm_new_internal(const char *disp_name, Ecore_Window parent, int x, int y, int w, int h, Eina_Bool frame)
|
||||||
{
|
{
|
||||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue