summaryrefslogtreecommitdiff
path: root/src/lib/ecore_evas/ecore_evas.c
diff options
context:
space:
mode:
authorDerek Foreman <derek.foreman.samsung@gmail.com>2018-08-08 09:37:29 -0400
committerMike Blumenkrantz <zmike@samsung.com>2018-08-08 09:37:30 -0400
commite382bac1a01a152d32a0f95df7a2ad6b84ae80d4 (patch)
tree337a9d04375fc4bb6680cf0172b644a2dffc967e /src/lib/ecore_evas/ecore_evas.c
parenta7f65c75d9073e624e129f4bc423d7854838c2c0 (diff)
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
Diffstat (limited to 'src/lib/ecore_evas/ecore_evas.c')
-rw-r--r--src/lib/ecore_evas/ecore_evas.c53
1 files changed, 50 insertions, 3 deletions
diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index 004896d..cce53df 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -4,6 +4,7 @@
4 4
5#define ECORE_EVAS_INTERNAL 5#define ECORE_EVAS_INTERNAL
6#define EFL_INPUT_EVENT_PROTECTED 6#define EFL_INPUT_EVENT_PROTECTED
7#define IPA_YLNO_ESU_LANRETNI_MLE
7 8
8#include <stdlib.h> 9#include <stdlib.h>
9#include <string.h> 10#include <string.h>
@@ -4339,14 +4340,16 @@ ecore_evas_wayland_shm_new(const char *disp_name, unsigned int parent,
4339 int x, int y, int w, int h, Eina_Bool frame) 4340 int x, int y, int w, int h, Eina_Bool frame)
4340{ 4341{
4341 Ecore_Evas *ee; 4342 Ecore_Evas *ee;
4342 Ecore_Evas *(*new)(const char *, unsigned int, int, int, int, int, Eina_Bool); 4343 Ecore_Evas *(*new)(const char *, Ecore_Window, int, int, int, int, Eina_Bool);
4343 Eina_Module *m = _ecore_evas_engine_load("wayland"); 4344 Eina_Module *m = _ecore_evas_engine_load("wayland");
4344 EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL); 4345 EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL);
4345 4346
4346 new = eina_module_symbol_get(m, "ecore_evas_wayland_shm_new_internal"); 4347 new = eina_module_symbol_get(m, "ecore_evas_wayland_shm_new_internal");
4347 EINA_SAFETY_ON_NULL_RETURN_VAL(new, NULL); 4348 EINA_SAFETY_ON_NULL_RETURN_VAL(new, NULL);
4348 4349
4349 ee = new(disp_name, parent, x, y, w, h, frame); 4350 if (parent) ERR("Wayland windows with parents not supported through legacy API");
4351
4352 ee = new(disp_name, 0, x, y, w, h, frame);
4350 if (!_ecore_evas_cursors_init(ee)) 4353 if (!_ecore_evas_cursors_init(ee))
4351 { 4354 {
4352 ecore_evas_free(ee); 4355 ecore_evas_free(ee);
@@ -4360,7 +4363,51 @@ ecore_evas_wayland_egl_new(const char *disp_name, unsigned int parent,
4360 int x, int y, int w, int h, Eina_Bool frame) 4363 int x, int y, int w, int h, Eina_Bool frame)
4361{ 4364{
4362 Ecore_Evas *ee; 4365 Ecore_Evas *ee;
4363 Ecore_Evas *(*new)(const char *, unsigned int, int, int, int, int, Eina_Bool); 4366 Ecore_Evas *(*new)(const char *, Ecore_Window, int, int, int, int, Eina_Bool);
4367 Eina_Module *m = _ecore_evas_engine_load("wayland");
4368 EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL);
4369
4370 new = eina_module_symbol_get(m, "ecore_evas_wayland_egl_new_internal");
4371 EINA_SAFETY_ON_NULL_RETURN_VAL(new, NULL);
4372
4373 if (parent) ERR("Wayland windows with parents not supported through legacy API");
4374
4375 ee = new(disp_name, 0, x, y, w, h, frame);
4376 if (!_ecore_evas_cursors_init(ee))
4377 {
4378 ecore_evas_free(ee);
4379 return NULL;
4380 }
4381 return ee;
4382}
4383
4384Ecore_Evas *
4385_wayland_shm_new(const char *disp_name, Ecore_Window parent,
4386 int x, int y, int w, int h, Eina_Bool frame)
4387{
4388 Ecore_Evas *ee;
4389 Ecore_Evas *(*new)(const char *, Ecore_Window, int, int, int, int, Eina_Bool);
4390 Eina_Module *m = _ecore_evas_engine_load("wayland");
4391 EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL);
4392
4393 new = eina_module_symbol_get(m, "ecore_evas_wayland_shm_new_internal");
4394 EINA_SAFETY_ON_NULL_RETURN_VAL(new, NULL);
4395
4396 ee = new(disp_name, parent, x, y, w, h, frame);
4397 if (!_ecore_evas_cursors_init(ee))
4398 {
4399 ecore_evas_free(ee);
4400 return NULL;
4401 }
4402 return ee;
4403}
4404
4405Ecore_Evas *
4406_wayland_egl_new(const char *disp_name, Ecore_Window parent,
4407 int x, int y, int w, int h, Eina_Bool frame)
4408{
4409 Ecore_Evas *ee;
4410 Ecore_Evas *(*new)(const char *, Ecore_Window, int, int, int, int, Eina_Bool);
4364 Eina_Module *m = _ecore_evas_engine_load("wayland"); 4411 Eina_Module *m = _ecore_evas_engine_load("wayland");
4365 EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL); 4412 EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL);
4366 4413