mirror of
https://github.com/labwc/labwc.git
synced 2025-11-06 13:29:58 -05:00
view: Use wlr_box for current/pending geometry
This commit is contained in:
parent
3941991505
commit
b75dbd5b38
15 changed files with 169 additions and 186 deletions
|
|
@ -2,6 +2,7 @@
|
|||
#ifndef __LABWC_SSD_INTERNAL_H
|
||||
#define __LABWC_SSD_INTERNAL_H
|
||||
|
||||
#include <wlr/util/box.h>
|
||||
#include "ssd.h"
|
||||
|
||||
#define FOR_EACH(tmp, ...) \
|
||||
|
|
@ -40,10 +41,7 @@ struct ssd {
|
|||
* don't update things we don't have to.
|
||||
*/
|
||||
struct {
|
||||
int x;
|
||||
int y;
|
||||
int width;
|
||||
int height;
|
||||
struct wlr_box geometry;
|
||||
struct ssd_state_title {
|
||||
char *text;
|
||||
struct ssd_state_title_width active;
|
||||
|
|
@ -51,7 +49,7 @@ struct ssd {
|
|||
} title;
|
||||
} state;
|
||||
|
||||
/* An invisble area around the view which allows resizing */
|
||||
/* An invisible area around the view which allows resizing */
|
||||
struct ssd_sub_tree extents;
|
||||
|
||||
/* The top of the view, containing buttons, title, .. */
|
||||
|
|
|
|||
|
|
@ -58,17 +58,28 @@ struct view {
|
|||
|
||||
struct wlr_output *fullscreen;
|
||||
|
||||
/* geometry of the wlr_surface contained within the view */
|
||||
int x, y, w, h;
|
||||
|
||||
/* user defined geometry before maximize / tiling / fullscreen */
|
||||
/*
|
||||
* Geometry of the wlr_surface contained within the view, as
|
||||
* currently displayed. Should be kept in sync with the
|
||||
* scene-graph at all times.
|
||||
*/
|
||||
struct wlr_box current;
|
||||
/*
|
||||
* Expected geometry after any pending move/resize requests
|
||||
* have been processed. Should match current geometry when no
|
||||
* move/resize requests are pending.
|
||||
*/
|
||||
struct wlr_box pending;
|
||||
/*
|
||||
* Saved geometry which will be restored when the view returns
|
||||
* to normal/floating state after being maximized/fullscreen/
|
||||
* tiled. Values are undefined/out-of-date when the view is not
|
||||
* maximized/fullscreen/tiled.
|
||||
*/
|
||||
struct wlr_box natural_geometry;
|
||||
|
||||
struct view_pending_move_resize {
|
||||
int x, y;
|
||||
uint32_t width, height;
|
||||
uint32_t configure_serial;
|
||||
} pending_move_resize;
|
||||
/* used by xdg-shell views */
|
||||
uint32_t pending_configure_serial;
|
||||
|
||||
struct ssd *ssd;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue