mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 12:55:58 +01:00
wlr_scene: Pull scene_node_get_root into a private header
We will need this for surface emulation on buffers.
This commit is contained in:
parent
39c059b70e
commit
5f56246571
2 changed files with 10 additions and 1 deletions
8
include/types/wlr_scene.h
Normal file
8
include/types/wlr_scene.h
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
#ifndef TYPES_WLR_SCENE_H
|
||||||
|
#define TYPES_WLR_SCENE_H
|
||||||
|
|
||||||
|
#include <wlr/types/wlr_scene.h>
|
||||||
|
|
||||||
|
struct wlr_scene *scene_node_get_root(struct wlr_scene_node *node);
|
||||||
|
|
||||||
|
#endif
|
|
@ -10,6 +10,7 @@
|
||||||
#include <wlr/types/wlr_scene.h>
|
#include <wlr/types/wlr_scene.h>
|
||||||
#include <wlr/util/log.h>
|
#include <wlr/util/log.h>
|
||||||
#include <wlr/util/region.h>
|
#include <wlr/util/region.h>
|
||||||
|
#include "types/wlr_scene.h"
|
||||||
#include "util/signal.h"
|
#include "util/signal.h"
|
||||||
|
|
||||||
static struct wlr_scene *scene_root_from_node(struct wlr_scene_node *node) {
|
static struct wlr_scene *scene_root_from_node(struct wlr_scene_node *node) {
|
||||||
|
@ -35,7 +36,7 @@ struct wlr_scene_buffer *wlr_scene_buffer_from_node(
|
||||||
return (struct wlr_scene_buffer *)node;
|
return (struct wlr_scene_buffer *)node;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct wlr_scene *scene_node_get_root(struct wlr_scene_node *node) {
|
struct wlr_scene *scene_node_get_root(struct wlr_scene_node *node) {
|
||||||
while (node->parent != NULL) {
|
while (node->parent != NULL) {
|
||||||
node = node->parent;
|
node = node->parent;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue