From a72c40a6b4a4f4312c49b1e471722b89968e0634 Mon Sep 17 00:00:00 2001 From: Johan Malm Date: Thu, 20 Aug 2020 21:13:04 +0100 Subject: [PATCH] Move xwl_nr_parents() --- include/labwc.h | 1 - src/debug/dbg.c | 17 +++++++++++++++++ src/xwl.c | 16 ---------------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/include/labwc.h b/include/labwc.h index e5ebb1e0..d6442228 100644 --- a/include/labwc.h +++ b/include/labwc.h @@ -136,7 +136,6 @@ struct keyboard { void xdg_toplevel_decoration(struct wl_listener *listener, void *data); void xdg_surface_new(struct wl_listener *listener, void *data); -int xwl_nr_parents(struct view *view); void xwl_surface_new(struct wl_listener *listener, void *data); void view_init_position(struct view *view); diff --git a/src/debug/dbg.c b/src/debug/dbg.c index 817a4354..caafcb9c 100644 --- a/src/debug/dbg.c +++ b/src/debug/dbg.c @@ -1,6 +1,23 @@ #include "labwc.h" #include "config/rcxml.h" #include "config/keybind.h" +#include "common/log.h" + +static int xwl_nr_parents(struct view *view) +{ + struct wlr_xwayland_surface *s = view->xwayland_surface; + int i = 0; + + if (!s) { + warn("(%s) no xwayland surface\n", __func__); + return -1; + } + while (s->parent) { + s = s->parent; + ++i; + } + return i; +} static void show_one_xdg_view(struct view *view) { diff --git a/src/xwl.c b/src/xwl.c index 212ad423..30adef43 100644 --- a/src/xwl.c +++ b/src/xwl.c @@ -1,22 +1,6 @@ #include "labwc.h" #include "common/log.h" -int xwl_nr_parents(struct view *view) -{ - struct wlr_xwayland_surface *s = view->xwayland_surface; - int i = 0; - - if (!s) { - warn("(%s) no xwayland surface\n", __func__); - return -1; - } - while (s->parent) { - s = s->parent; - ++i; - } - return i; -} - static bool has_ssd(struct view *view) { if (view->xwayland_surface->override_redirect) -- 2.52.0