mirror of
https://github.com/swaywm/sway.git
synced 2025-11-12 13:29:56 -05:00
Listen to output layout change
This commit is contained in:
parent
f3d880b0ec
commit
c7abb77f22
7 changed files with 43 additions and 30 deletions
|
|
@ -57,9 +57,9 @@ enum swayc_border_types {
|
|||
B_NORMAL, /**< Normal border with title bar */
|
||||
};
|
||||
|
||||
struct sway_root;
|
||||
struct sway_output;
|
||||
struct sway_view;
|
||||
struct wlr_output_layout;
|
||||
|
||||
/**
|
||||
* Stores information about a container.
|
||||
|
|
@ -69,7 +69,7 @@ struct wlr_output_layout;
|
|||
struct sway_container {
|
||||
union {
|
||||
// TODO: Encapsulate state for other node types as well like C_CONTAINER
|
||||
struct wlr_output_layout *output_layout; // C_ROOT
|
||||
struct sway_root *sway_root; // C_ROOT
|
||||
struct sway_output *sway_output; // C_OUTPUT
|
||||
struct sway_view *sway_view; // C_VIEW
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,8 +1,16 @@
|
|||
#ifndef _SWAY_LAYOUT_H
|
||||
#define _SWAY_LAYOUT_H
|
||||
|
||||
#include <wlr/types/wlr_output_layout.h>
|
||||
|
||||
struct sway_container;
|
||||
|
||||
struct sway_root {
|
||||
struct wlr_output_layout *output_layout;
|
||||
|
||||
struct wl_listener output_layout_change;
|
||||
};
|
||||
|
||||
void init_layout(void);
|
||||
void add_child(struct sway_container *parent, struct sway_container *child);
|
||||
struct sway_container *remove_child(struct sway_container *child);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue