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
This commit is contained in:
Mike Blumenkrantz 2020-03-12 12:15:57 -04:00
parent 12854eac34
commit 09aba19cc9
3 changed files with 11 additions and 11 deletions

View File

@ -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
*

View File

@ -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

View File

@ -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 {