zmike pushed a commit to branch master.

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

commit 09aba19cc9db289e4c30ff25bb61974f4afcad18
Author: Mike Blumenkrantz <[email protected]>
Date:   Thu Mar 12 12:15:57 2020 -0400

    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
---
 src/lib/efl_wl/Efl_Wl.h  |  2 +-
 src/lib/efl_wl/efl_wl.c  | 16 ++++++++--------
 src/lib/efl_wl/efl_wl.eo |  4 ++--
 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;
 typedef void * Efl_Wl_Wl_Interface_Bind_Cb;
 typedef struct Efl_Wl_Xkb_State Efl_Wl_Xkb_State;
 
-#include <efl_wl.eo.h>
 #include <efl_wl_surface.eo.h>
+#include <efl_wl.eo.h>
 /**
  * @defgroup Efl_Wl_Group EFL Wayland
  *
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)
    eina_hash_del_by_key(c->exes, &pid);
 }
 
-EOLIAN static Eina_Bool
+EOLIAN static Eo *
 _efl_wl_surface_next(Eo *obj, Comp *c)
 {
    Comp_Surface *cs;
 
-   if (c->surfaces_count < 2) return EINA_FALSE;
+   if (c->surfaces_count < 2) return NULL;
    EINA_INLIST_REVERSE_FOREACH(c->surfaces, cs)
      {
         if (cs->shell.activated) continue;
         if ((!cs->role) || (!cs->shell.surface) || cs->dead) continue;
         cs->shell.activated = 1;
         shell_surface_send_configure(cs);
-        return EINA_TRUE;
+        return cs->obj;
      }
 
-   return EINA_FALSE;
+   return NULL;
 }
 
-EOLIAN static Eina_Bool
+EOLIAN static Eo *
 _efl_wl_surface_prev(Eo *obj, Comp *c)
 {
    Comp_Surface *cs;
 
-   if (c->surfaces_count < 2) return EINA_FALSE;
+   if (c->surfaces_count < 2) return NULL;
    EINA_INLIST_FOREACH(c->surfaces, cs)
      {
         if (cs->shell.activated) continue;
         if ((!cs->role) || (!cs->shell.surface) || cs->dead) continue;
         cs->shell.activated = 1;
         shell_surface_send_configure(cs);
-        return EINA_TRUE;
+        return cs->obj;
      }
 
-   return EINA_FALSE;
+   return NULL;
 }
 
 EOLIAN 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
          }
       }
       surface_next {
-         return: bool;
+         return: Efl.Wl.Surface;
       }
       surface_prev {
-         return: bool;
+         return: Efl.Wl.Surface;
       }
       @property aspect {
          values {

-- 


Reply via email to