better handling different window state, support fullscreen mode

This commit is contained in:
DanyLE
2024-04-03 00:48:59 +02:00
parent 1ae9cd000a
commit bca498f387
5 changed files with 123 additions and 95 deletions

16
diyac.h
View File

@@ -37,11 +37,15 @@ enum diyac_node_descriptor_type
// LAB_NODE_TREE,
// LAB_NODE_SSD_BUTTON,
};
enum diyac_view_state
struct diyac_view_state
{
DIYAC_VIEW_NORMAL = 0,
DIYAC_VIEW_MAXIMIZE,
DIYAC_VIEW_FULL_SCREEN,
bool maximized;
bool fullscreen;
bool minimized;
/**
* if neither state is on, it means that
* the current state is normal
*/
};
struct diyac_seat
@@ -165,8 +169,8 @@ struct diyac_view
struct wlr_xdg_surface *xdg_surface;
struct wlr_xdg_toplevel *xdg_toplevel;
struct wlr_scene_tree *scene_tree;
enum diyac_view_state state;
enum diyac_view_state requested;
struct diyac_view_state state;
struct diyac_view_state requested;
/*
* Geometry of the wlr_surface contained within the view, as
* currently displayed. Should be kept in sync with the