summaryrefslogtreecommitdiff
path: root/src/lib/efl_wl
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2020-03-12 12:16:04 -0400
committerMike Blumenkrantz <zmike@samsung.com>2020-03-12 12:17:07 -0400
commit2754b24cdd2901e839a070e88b899907a1496406 (patch)
tree062a5984710086d138e500cdb9e2ad78f632ef92 /src/lib/efl_wl
parent09aba19cc9db289e4c30ff25bb61974f4afcad18 (diff)
efl-wl: add active_surface property
Summary: this is probably useful? Depends on D11469 Reviewers: segfaultxavi, bu5hm4n Reviewed By: bu5hm4n Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11470
Diffstat (limited to 'src/lib/efl_wl')
-rw-r--r--src/lib/efl_wl/efl_wl.c22
-rw-r--r--src/lib/efl_wl/efl_wl.eo9
2 files changed, 31 insertions, 0 deletions
diff --git a/src/lib/efl_wl/efl_wl.c b/src/lib/efl_wl/efl_wl.c
index 84a61e83ae..56efb5c6d7 100644
--- a/src/lib/efl_wl/efl_wl.c
+++ b/src/lib/efl_wl/efl_wl.c
@@ -5620,6 +5620,28 @@ _efl_wl_surface_prev(Eo *obj, Comp *c)
5620 return NULL; 5620 return NULL;
5621} 5621}
5622 5622
5623EOLIAN static Eo *
5624_efl_wl_active_surface_get(const Eo *obj, Comp *c)
5625{
5626 if (c->active_surface && (!c->active_surface->dead))
5627 return c->active_surface->obj;
5628 return NULL;
5629}
5630
5631EOLIAN static Eina_Bool
5632_efl_wl_active_surface_set(Eo *obj, Comp *c, Eo *surface)
5633{
5634 Comp_Surface *cs = efl_data_scope_get(surface, EFL_WL_SURFACE_CLASS);
5635 EINA_SAFETY_ON_NULL_RETURN_VAL(cs, EINA_FALSE);
5636 if (cs->dead) return EINA_FALSE;
5637 if (c->active_surface == cs) return EINA_TRUE;
5638 /* can't activate a popup */
5639 if (cs->shell.popup) return EINA_FALSE;
5640 cs->shell.activated = 1;
5641 shell_surface_send_configure(cs);
5642 return EINA_TRUE;
5643}
5644
5623EOLIAN static void 5645EOLIAN static void
5624_efl_wl_rotation_get(const Eo *obj EINA_UNUSED, Comp *c, Efl_Wl_Rotation *rotation, Eina_Bool *rtl) 5646_efl_wl_rotation_get(const Eo *obj EINA_UNUSED, Comp *c, Efl_Wl_Rotation *rotation, Eina_Bool *rtl)
5625{ 5647{
diff --git a/src/lib/efl_wl/efl_wl.eo b/src/lib/efl_wl/efl_wl.eo
index af7f79393c..b41b429871 100644
--- a/src/lib/efl_wl/efl_wl.eo
+++ b/src/lib/efl_wl/efl_wl.eo
@@ -59,6 +59,15 @@ class @beta Efl.Wl extends Efl.Canvas.Group
59 surface_prev { 59 surface_prev {
60 return: Efl.Wl.Surface; 60 return: Efl.Wl.Surface;
61 } 61 }
62 @property active_surface {
63 get {}
64 set {
65 return: bool;
66 }
67 values {
68 surface: Efl.Wl.Surface;
69 }
70 }
62 @property aspect { 71 @property aspect {
63 values { 72 values {
64 set: bool; 73 set: bool;