diff options
Diffstat (limited to 'src/x11_util.h')
-rw-r--r-- | src/x11_util.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/x11_util.h b/src/x11_util.h new file mode 100644 index 0000000..7ca2e7c --- /dev/null +++ b/src/x11_util.h @@ -0,0 +1,20 @@ +// Copyright 2020-2024 David Robillard <d@drobilla.net> +// SPDX-License-Identifier: ISC + +#ifndef SUIL_X11_UTIL +#define SUIL_X11_UTIL + +#include <X11/X.h> +#include <X11/Xlib.h> + +#include <stdbool.h> + +/// Return whether `child` can be found in the subtree under `parent` +bool +suil_x11_is_valid_child(Display* display, Window parent, Window child); + +/// Return the non-root parent window of `child` if it has one, or zero +Window +suil_x11_get_parent(Display* display, Window child); + +#endif // SUIL_X11_UTIL |