summaryrefslogtreecommitdiff
path: root/src/lib/efl_wl
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2020-03-12 12:15:57 -0400
committerMike Blumenkrantz <zmike@samsung.com>2020-03-12 12:17:07 -0400
commit09aba19cc9db289e4c30ff25bb61974f4afcad18 (patch)
treed24045fbb2b5c4335cb809869e63da6947918bdc /src/lib/efl_wl
parent12854eac34d8d1decc3c61867d242887a288ac6e (diff)
efl-wl: make surface restacking functions return the current surface
Summary: seems more useful Depends on D11468 Reviewers: segfaultxavi, bu5hm4n Reviewed By: bu5hm4n Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11469
Diffstat (limited to 'src/lib/efl_wl')
-rw-r--r--src/lib/efl_wl/Efl_Wl.h2
-rw-r--r--src/lib/efl_wl/efl_wl.c16
-rw-r--r--src/lib/efl_wl/efl_wl.eo4
3 files changed, 11 insertions, 11 deletions
diff --git a/src/lib/efl_wl/Efl_Wl.h b/src/lib/efl_wl/Efl_Wl.h
index 71b3c2c190..d24557dc1a 100644
--- a/src/lib/efl_wl/Efl_Wl.h
+++ b/src/lib/efl_wl/Efl_Wl.h
@@ -31,8 +31,8 @@ typedef void * Efl_Wl_Wl_Interface_Data;
31typedef void * Efl_Wl_Wl_Interface_Bind_Cb; 31typedef void * Efl_Wl_Wl_Interface_Bind_Cb;
32typedef struct Efl_Wl_Xkb_State Efl_Wl_Xkb_State; 32typedef struct Efl_Wl_Xkb_State Efl_Wl_Xkb_State;
33 33
34#include <efl_wl.eo.h>
35#include <efl_wl_surface.eo.h> 34#include <efl_wl_surface.eo.h>
35#include <efl_wl.eo.h>
36/** 36/**
37 * @defgroup Efl_Wl_Group EFL Wayland 37 * @defgroup Efl_Wl_Group EFL Wayland
38 * 38 *
diff --git a/src/lib/efl_wl/efl_wl.c b/src/lib/efl_wl/efl_wl.c
index 0aa1d23096..84a61e83ae 100644
--- a/src/lib/efl_wl/efl_wl.c
+++ b/src/lib/efl_wl/efl_wl.c
@@ -5584,40 +5584,40 @@ _efl_wl_allowed_pid_del(Eo *obj, Comp *c, int32_t pid)
5584 eina_hash_del_by_key(c->exes, &pid); 5584 eina_hash_del_by_key(c->exes, &pid);
5585} 5585}
5586 5586
5587EOLIAN static Eina_Bool 5587EOLIAN static Eo *
5588_efl_wl_surface_next(Eo *obj, Comp *c) 5588_efl_wl_surface_next(Eo *obj, Comp *c)
5589{ 5589{
5590 Comp_Surface *cs; 5590 Comp_Surface *cs;
5591 5591
5592 if (c->surfaces_count < 2) return EINA_FALSE; 5592 if (c->surfaces_count < 2) return NULL;
5593 EINA_INLIST_REVERSE_FOREACH(c->surfaces, cs) 5593 EINA_INLIST_REVERSE_FOREACH(c->surfaces, cs)
5594 { 5594 {
5595 if (cs->shell.activated) continue; 5595 if (cs->shell.activated) continue;
5596 if ((!cs->role) || (!cs->shell.surface) || cs->dead) continue; 5596 if ((!cs->role) || (!cs->shell.surface) || cs->dead) continue;
5597 cs->shell.activated = 1; 5597 cs->shell.activated = 1;
5598 shell_surface_send_configure(cs); 5598 shell_surface_send_configure(cs);
5599 return EINA_TRUE; 5599 return cs->obj;
5600 } 5600 }
5601 5601
5602 return EINA_FALSE; 5602 return NULL;
5603} 5603}
5604 5604
5605EOLIAN static Eina_Bool 5605EOLIAN static Eo *
5606_efl_wl_surface_prev(Eo *obj, Comp *c) 5606_efl_wl_surface_prev(Eo *obj, Comp *c)
5607{ 5607{
5608 Comp_Surface *cs; 5608 Comp_Surface *cs;
5609 5609
5610 if (c->surfaces_count < 2) return EINA_FALSE; 5610 if (c->surfaces_count < 2) return NULL;
5611 EINA_INLIST_FOREACH(c->surfaces, cs) 5611 EINA_INLIST_FOREACH(c->surfaces, cs)
5612 { 5612 {
5613 if (cs->shell.activated) continue; 5613 if (cs->shell.activated) continue;
5614 if ((!cs->role) || (!cs->shell.surface) || cs->dead) continue; 5614 if ((!cs->role) || (!cs->shell.surface) || cs->dead) continue;
5615 cs->shell.activated = 1; 5615 cs->shell.activated = 1;
5616 shell_surface_send_configure(cs); 5616 shell_surface_send_configure(cs);
5617 return EINA_TRUE; 5617 return cs->obj;
5618 } 5618 }
5619 5619
5620 return EINA_FALSE; 5620 return NULL;
5621} 5621}
5622 5622
5623EOLIAN static void 5623EOLIAN static void
diff --git a/src/lib/efl_wl/efl_wl.eo b/src/lib/efl_wl/efl_wl.eo
index 20663624cb..af7f79393c 100644
--- a/src/lib/efl_wl/efl_wl.eo
+++ b/src/lib/efl_wl/efl_wl.eo
@@ -54,10 +54,10 @@ class @beta Efl.Wl extends Efl.Canvas.Group
54 } 54 }
55 } 55 }
56 surface_next { 56 surface_next {
57 return: bool; 57 return: Efl.Wl.Surface;
58 } 58 }
59 surface_prev { 59 surface_prev {
60 return: bool; 60 return: Efl.Wl.Surface;
61 } 61 }
62 @property aspect { 62 @property aspect {
63 values { 63 values {