Discussion:
[EGIT] [core/efl] efl-1.20 01/07: wayland: set min/max size hints to surface before show
(too old to reply)
Mike Blumenkrantz
2017-08-11 23:01:54 UTC
Permalink
discomfitor pushed a commit to branch efl-1.20.

http://git.enlightenment.org/core/efl.git/commit/?id=cceb25d9a73acda33608cb740891598c52631907

commit cceb25d9a73acda33608cb740891598c52631907
Author: Mike Blumenkrantz <***@osg.samsung.com>
Date: Fri Aug 11 18:43:15 2017 -0400

wayland: set min/max size hints to surface before show

with deferred surface creation the first canvas change of hints may not
be able to trigger protocol methods for size hints, so ensure that hints are
set
---
src/lib/ecore_wl2/ecore_wl2_private.h | 2 ++
.../engines/wayland/ecore_evas_wayland_common.c | 36 ++++++++++++++++++++--
2 files changed, 36 insertions(+), 2 deletions(-)

diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h b/src/lib/ecore_wl2/ecore_wl2_private.h
index 3569db9f39..585615c726 100644
--- a/src/lib/ecore_wl2/ecore_wl2_private.h
+++ b/src/lib/ecore_wl2/ecore_wl2_private.h
@@ -201,6 +201,8 @@ struct _Ecore_Wl2_Window
struct
{
Eina_Bool configure : 1;
+ Eina_Bool min : 1;
+ Eina_Bool max : 1;
} pending;

struct
diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
index d6b6350174..417c6e9485 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
@@ -192,6 +192,17 @@ _ecore_evas_wl_common_resize(Ecore_Evas *ee, int w, int h)
ee->w = w;
ee->h = h;

+ if (wdata->win->zxdg_set_min_size && wdata->win->zxdg_toplevel && wdata->win->pending.min)
+ {
+ wdata->win->zxdg_set_min_size(wdata->win->zxdg_toplevel, ee->prop.min.w, ee->prop.min.h);
+ wdata->win->pending.min = 0;
+ }
+ if (wdata->win->zxdg_set_max_size && wdata->win->zxdg_toplevel && wdata->win->pending.max)
+ {
+ wdata->win->zxdg_set_max_size(wdata->win->zxdg_toplevel, ee->prop.max.w, ee->prop.max.h);
+ wdata->win->pending.max = 0;
+ }
+
if (!ee->prop.fullscreen)
{
int fw = 0, fh = 0;
@@ -1426,7 +1437,12 @@ _ecore_evas_wl_common_size_min_set(Ecore_Evas *ee, int w, int h)
ee->prop.min.h = h;
wdata = ee->engine.data;
if (wdata->win->zxdg_set_min_size && wdata->win->zxdg_toplevel)
- wdata->win->zxdg_set_min_size(wdata->win->zxdg_toplevel, w, h);
+ {
+ wdata->win->zxdg_set_min_size(wdata->win->zxdg_toplevel, w, h);
+ wdata->win->pending.min = 0;
+ }
+ else
+ wdata->win->pending.min = 1;
_ecore_evas_wl_common_resize(ee, ee->w, ee->h);
}

@@ -1442,7 +1458,12 @@ _ecore_evas_wl_common_size_max_set(Ecore_Evas *ee, int w, int h)
ee->prop.max.h = h;
wdata = ee->engine.data;
if (wdata->win->zxdg_set_max_size && wdata->win->zxdg_toplevel)
- wdata->win->zxdg_set_max_size(wdata->win->zxdg_toplevel, w, h);
+ {
+ wdata->win->zxdg_set_max_size(wdata->win->zxdg_toplevel, w, h);
+ wdata->win->pending.max = 0;
+ }
+ else
+ wdata->win->pending.max = 1;
_ecore_evas_wl_common_resize(ee, ee->w, ee->h);
}

@@ -1953,6 +1974,17 @@ _ecore_evas_wl_common_show(Ecore_Evas *ee)
{
int fw, fh;

+ if (wdata->win->zxdg_set_min_size && wdata->win->zxdg_toplevel && wdata->win->pending.min)
+ {
+ wdata->win->zxdg_set_min_size(wdata->win->zxdg_toplevel, ee->prop.min.w, ee->prop.min.h);
+ wdata->win->pending.min = 0;
+ }
+ if (wdata->win->zxdg_set_max_size && wdata->win->zxdg_toplevel && wdata->win->pending.max)
+ {
+ wdata->win->zxdg_set_max_size(wdata->win->zxdg_toplevel, ee->prop.max.w, ee->prop.max.h);
+ wdata->win->pending.max = 0;
+ }
+
evas_output_framespace_get(ee->evas, NULL, NULL, &fw, &fh);

ecore_wl2_window_show(wdata->win);

--
Mike Blumenkrantz
2017-08-11 23:01:59 UTC
Permalink
discomfitor pushed a commit to branch efl-1.20.

http://git.enlightenment.org/core/efl.git/commit/?id=e500d502da1c2e907fb6033b810f8b4966f8150a

commit e500d502da1c2e907fb6033b810f8b4966f8150a
Author: Mike Blumenkrantz <***@osg.samsung.com>
Date: Fri Aug 11 18:43:15 2017 -0400

ecore: always set delete_me before removing fd from poll

ensure bad fds don't immediately get re-added to polling

@fix
---
src/lib/ecore/ecore_main.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c
index 4bf3dc546d..8ca2c96293 100644
--- a/src/lib/ecore/ecore_main.c
+++ b/src/lib/ecore/ecore_main.c
@@ -1222,8 +1222,8 @@ _ecore_main_fd_handler_del(Ecore_Fd_Handler *fd_handler)
return NULL;
}

- _ecore_main_fdh_poll_del(fd_handler);
fd_handler->delete_me = EINA_TRUE;
+ _ecore_main_fdh_poll_del(fd_handler);
fd_handlers_to_delete = eina_list_append(fd_handlers_to_delete, fd_handler);
if (fd_handler->prep_func && fd_handlers_with_prep)
fd_handlers_with_prep = eina_list_remove(fd_handlers_with_prep, fd_handler);
@@ -1882,8 +1882,8 @@ _ecore_main_fd_handlers_bads_rem(void)
ERR("Fd function err returned 0, remove it");
if (!fdh->delete_me)
{
- _ecore_main_fdh_poll_del(fdh);
fdh->delete_me = EINA_TRUE;
+ _ecore_main_fdh_poll_del(fdh);
fd_handlers_to_delete = eina_list_append(fd_handlers_to_delete, fdh);
}
found++;
@@ -1895,8 +1895,8 @@ _ecore_main_fd_handlers_bads_rem(void)
ERR("Problematic fd found at %d! setting it for delete", fdh->fd);
if (!fdh->delete_me)
{
- _ecore_main_fdh_poll_del(fdh);
fdh->delete_me = EINA_TRUE;
+ _ecore_main_fdh_poll_del(fdh);
fd_handlers_to_delete = eina_list_append(fd_handlers_to_delete, fdh);
}

@@ -2006,8 +2006,8 @@ _ecore_main_fd_handlers_call(void)
{
if (!fdh->delete_me)
{
- _ecore_main_fdh_poll_del(fdh);
fdh->delete_me = EINA_TRUE;
+ _ecore_main_fdh_poll_del(fdh);
fd_handlers_to_delete = eina_list_append(fd_handlers_to_delete, fdh);
}
}
@@ -2087,6 +2087,7 @@ _ecore_main_loop_uv_prepare(uv_prepare_t* handle EINA_UNUSED)
fdh = fd_handlers;
fd_handlers = (Ecore_Fd_Handler *)eina_inlist_remove(EINA_INLIST_GET(fd_handlers),
EINA_INLIST_GET(fdh));
+ fdh->delete_me = 1;
_ecore_main_fdh_poll_del(fdh);
ECORE_MAGIC_SET(fdh, ECORE_MAGIC_NONE);
ecore_fd_handler_mp_free(fdh);

--
Mike Blumenkrantz
2017-08-11 23:01:57 UTC
Permalink
discomfitor pushed a commit to branch efl-1.20.

http://git.enlightenment.org/core/efl.git/commit/?id=b2b257f46f0459d08a98439cb3919883d7bf9f55

commit b2b257f46f0459d08a98439cb3919883d7bf9f55
Author: Mike Blumenkrantz <***@osg.samsung.com>
Date: Fri Aug 11 18:43:15 2017 -0400

efl-wl: always dismiss popups on hide

@fix
---
src/lib/efl_wl/efl_wl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/efl_wl/efl_wl.c b/src/lib/efl_wl/efl_wl.c
index 4465e4a6f2..5c4ebe541c 100644
--- a/src/lib/efl_wl/efl_wl.c
+++ b/src/lib/efl_wl/efl_wl.c
@@ -2307,7 +2307,7 @@ comp_surface_smart_hide(Evas_Object *obj)

if (!cs->shell.activated) return;
cs->shell.activated = 0;
- if (cs->shell.grabs && cs->role)
+ if (cs->shell.popup && cs->role)
zxdg_popup_v6_send_popup_done(cs->role);
if (cs->parent && cs->shell.popup) return;
/* attempt to revert focus based on stacking order */

--
Mike Blumenkrantz
2017-08-11 23:02:00 UTC
Permalink
discomfitor pushed a commit to branch efl-1.20.

http://git.enlightenment.org/core/efl.git/commit/?id=bc30a915dba4cb690337b72eadfcc83b842d1092

commit bc30a915dba4cb690337b72eadfcc83b842d1092
Author: Mike Blumenkrantz <***@osg.samsung.com>
Date: Fri Aug 11 18:43:15 2017 -0400

efl-wl: initialize seat keymap fd to -1

@fix
---
src/lib/efl_wl/efl_wl.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/src/lib/efl_wl/efl_wl.c b/src/lib/efl_wl/efl_wl.c
index f130a475ed..1076ba5507 100644
--- a/src/lib/efl_wl/efl_wl.c
+++ b/src/lib/efl_wl/efl_wl.c
@@ -4177,6 +4177,7 @@ comp_seats_proxy(Comp *c)
s = calloc(1, sizeof(Comp_Seat));
s->c = c;
s->dev = dev;
+ s->kbd.keymap_fd = -1;
efl_ref(s->dev);
if (c->parent_disp)
comp_seat_proxy_update(s);

--
Mike Blumenkrantz
2017-08-11 23:01:56 UTC
Permalink
discomfitor pushed a commit to branch efl-1.20.

http://git.enlightenment.org/core/efl.git/commit/?id=5ceda8002dd07e37211ea9a400025e28d1168a6f

commit 5ceda8002dd07e37211ea9a400025e28d1168a6f
Author: Mike Blumenkrantz <***@osg.samsung.com>
Date: Fri Aug 11 18:43:15 2017 -0400

elm_widget: do not reparent subobjs to top widget for non-elm objects

this breaks handling of non-elm objects and makes it impossible to safely manage
object lifetimes

ref D3957
ref 62cf70034de38b17f2025e08f81b5758b3d6d6e3

@fix
---
src/lib/elementary/elm_widget.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/lib/elementary/elm_widget.h b/src/lib/elementary/elm_widget.h
index bcfb5aed52..88832e8905 100644
--- a/src/lib/elementary/elm_widget.h
+++ b/src/lib/elementary/elm_widget.h
@@ -851,7 +851,8 @@ static inline Eina_Bool
_elm_widget_sub_object_redirect_to_top(Evas_Object *obj, Evas_Object *sobj)
{
Eina_Bool ret = elm_widget_sub_object_del(obj, sobj);
- if (ret)
+ if (!ret) return ret;
+ if (elm_widget_is(sobj))
ret = elm_widget_sub_object_add(elm_widget_top_get(obj), sobj);

return ret;

--
Mike Blumenkrantz
2017-08-11 23:01:55 UTC
Permalink
discomfitor pushed a commit to branch efl-1.20.

http://git.enlightenment.org/core/efl.git/commit/?id=baca7e11366354b4f58c37a6641debbc6443daad

commit baca7e11366354b4f58c37a6641debbc6443daad
Author: Mike Blumenkrantz <***@osg.samsung.com>
Date: Fri Aug 11 18:43:15 2017 -0400

efl-wl: use correct accessor method for keyboard resource hash

@fix
---
src/lib/efl_wl/efl_wl.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/lib/efl_wl/efl_wl.c b/src/lib/efl_wl/efl_wl.c
index 03e1128836..4465e4a6f2 100644
--- a/src/lib/efl_wl/efl_wl.c
+++ b/src/lib/efl_wl/efl_wl.c
@@ -3469,7 +3469,7 @@ seat_keymap_update(Comp_Seat *s)
{
char *str;
Eina_Tmpstr *file;
- struct wl_resource *res;
+ Eina_List *l;
Eina_Iterator *it;
xkb_mod_mask_t latched = 0, locked = 0;

@@ -3525,8 +3525,13 @@ seat_keymap_update(Comp_Seat *s)
free(str);

it = eina_hash_iterator_data_new(s->kbd.resources);
- EINA_ITERATOR_FOREACH(it, res)
- wl_keyboard_send_keymap(res, WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1, s->kbd.keymap_fd, s->kbd.keymap_mem_size);
+ EINA_ITERATOR_FOREACH(it, l)
+ {
+ Eina_List *ll;
+ struct wl_resource *res;
+ EINA_LIST_FOREACH(l, ll, res)
+ wl_keyboard_send_keymap(res, WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1, s->kbd.keymap_fd, s->kbd.keymap_mem_size);
+ }
eina_iterator_free(it);
}


--
Mike Blumenkrantz
2017-08-11 23:01:58 UTC
Permalink
discomfitor pushed a commit to branch efl-1.20.

http://git.enlightenment.org/core/efl.git/commit/?id=2e0d748c33a6ddb4de80d766df0e8c7bcd0dde5c

commit 2e0d748c33a6ddb4de80d766df0e8c7bcd0dde5c
Author: Mike Blumenkrantz <***@osg.samsung.com>
Date: Fri Aug 11 18:43:15 2017 -0400

efl-wl: handle case where eglBindWaylandDisplay fails

@fix
---
src/lib/efl_wl/efl_wl.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/lib/efl_wl/efl_wl.c b/src/lib/efl_wl/efl_wl.c
index 5c4ebe541c..f130a475ed 100644
--- a/src/lib/efl_wl/efl_wl.c
+++ b/src/lib/efl_wl/efl_wl.c
@@ -3887,9 +3887,8 @@ comp_gl_init(Comp *c)
c->glsfc = evas_gl_surface_create(c->gl, c->glcfg, 1, 1);
evas_gl_make_current(c->gl, c->glsfc, c->glctx);
c->glapi = evas_gl_context_api_get(c->gl, c->glctx);
- if (c->glapi->evasglBindWaylandDisplay)
- c->glapi->evasglBindWaylandDisplay(c->gl, c->display);
- else
+ if ((!c->glapi->evasglBindWaylandDisplay) ||
+ (!c->glapi->evasglBindWaylandDisplay(c->gl, c->display)))
comp_gl_shutdown(c);
}


--

Loading...