]> git.mdlowis.com Git - proto/labwc.git/commitdiff
Move xwl_nr_parents()
authorJohan Malm <jgm323@gmail.com>
Thu, 20 Aug 2020 20:13:04 +0000 (21:13 +0100)
committerJohan Malm <jgm323@gmail.com>
Thu, 20 Aug 2020 20:13:04 +0000 (21:13 +0100)
include/labwc.h
src/debug/dbg.c
src/xwl.c

index e5ebb1e044dda7e84f8d7f9647ba92c22299ebe2..d64422283336817095eacf9a17129e979987f18e 100644 (file)
@@ -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);
index 817a43549196aa32646159e6780827bc52b29177..caafcb9c7ae9f66f45943aaf95cc4a56e716ee16 100644 (file)
@@ -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)
 {
index 212ad4231d268178bd4872f0473dcaccf60454b4..30adef430fa84bf18dff7fb2c0dc5aa430490944 100644 (file)
--- 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)