wayland: track is-resizing state

This commit is contained in:
Daniel Eklöf 2021-01-10 15:40:11 +01:00
parent 77186d16e8
commit 4ebd58e388
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 6 additions and 5 deletions

View file

@ -535,6 +535,7 @@ xdg_toplevel_configure(void *data, struct xdg_toplevel *xdg_toplevel,
bool is_activated = false;
bool is_fullscreen = false;
bool is_maximized = false;
bool is_resizing = false;
bool is_tiled_top = false;
bool is_tiled_bottom = false;
bool is_tiled_left = false;
@ -566,11 +567,7 @@ xdg_toplevel_configure(void *data, struct xdg_toplevel *xdg_toplevel,
case XDG_TOPLEVEL_STATE_TILED_RIGHT: is_tiled_right = true; break;
case XDG_TOPLEVEL_STATE_TILED_TOP: is_tiled_top = true; break;
case XDG_TOPLEVEL_STATE_TILED_BOTTOM: is_tiled_bottom = true; break;
case XDG_TOPLEVEL_STATE_RESIZING:
/* Ignored */
/* TODO: throttle? */
break;
case XDG_TOPLEVEL_STATE_RESIZING: is_resizing = true; break;
}
#if defined(LOG_ENABLE_DBG) && LOG_ENABLE_DBG
@ -614,6 +611,7 @@ xdg_toplevel_configure(void *data, struct xdg_toplevel *xdg_toplevel,
win->configure.is_activated = is_activated;
win->configure.is_fullscreen = is_fullscreen;
win->configure.is_maximized = is_maximized;
win->configure.is_resizing = is_resizing;
win->configure.is_tiled_top = is_tiled_top;
win->configure.is_tiled_bottom = is_tiled_bottom;
win->configure.is_tiled_left = is_tiled_left;
@ -648,6 +646,7 @@ xdg_surface_configure(void *data, struct xdg_surface *xdg_surface,
bool wasnt_configured = !win->is_configured;
win->is_configured = true;
win->is_maximized = win->configure.is_maximized;
win->is_resizing = win->configure.is_resizing;
win->is_tiled_top = win->configure.is_tiled_top;
win->is_tiled_bottom = win->configure.is_tiled_bottom;
win->is_tiled_left = win->configure.is_tiled_left;

View file

@ -372,6 +372,7 @@ struct wl_window {
bool is_configured;
bool is_fullscreen;
bool is_maximized;
bool is_resizing;
bool is_tiled_top;
bool is_tiled_bottom;
bool is_tiled_left;
@ -383,6 +384,7 @@ struct wl_window {
uint8_t is_activated:1;
uint8_t is_fullscreen:1;
uint8_t is_maximized:1;
uint8_t is_resizing:1;
uint8_t is_tiled_top:1;
uint8_t is_tiled_bottom:1;
uint8_t is_tiled_left:1;