view: add move_to_front to struct view_impl

...to increase xwayland and xdg-shell encapsulation and to avoid passing a
function pointer as an argument in `xwayland_move_sub_views_to_front()`
which is inconsistent with labwc design patterns.

Rename view-impl.c to view-impl-common.c

Move function declarations that are common to view-implementations from
view.h into view-impl-common.h
This commit is contained in:
Johan Malm 2023-02-05 19:29:24 +00:00 committed by Johan Malm
parent 440372c2da
commit b8ec5a3e2e
10 changed files with 74 additions and 55 deletions

View file

@ -4,6 +4,7 @@
#include "labwc.h"
#include "node.h"
#include "view.h"
#include "view-impl-common.h"
#include "workspaces.h"
struct wlr_xdg_surface *
@ -389,6 +390,7 @@ static const struct view_impl xdg_toplevel_view_impl = {
.set_fullscreen = xdg_toplevel_view_set_fullscreen,
.unmap = xdg_toplevel_view_unmap,
.maximize = xdg_toplevel_view_maximize,
.move_to_front = view_impl_move_to_front,
};
void