mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-06 07:15:30 -04:00
wayland: apply CSD/SSD changes in the surface configure event
The configure event asks the client to change its decoration
mode. The configured state should not be applied immediately.
Clients must send an ack_configure in response to this event.
See xdg_surface.configure and xdg_surface.ack_configure for
details.
In particular, ”the configured state should *not* be applied
immediately”.
Instead, treat CSD/SSD changes like all other window dimension related
changes: store the to-be mode in win->configure, and apply it in the
surface configure event.
This fixes an issue where foot incorrectly resized the window when the
server switched between CSD/SSD at run-time.
This commit is contained in:
parent
7632e16e36
commit
2a83202fdd
5 changed files with 43 additions and 52 deletions
|
|
@ -384,6 +384,8 @@ struct wl_url {
|
|||
struct wl_surf_subsurf surf;
|
||||
};
|
||||
|
||||
enum csd_mode {CSD_UNKNOWN, CSD_NO, CSD_YES};
|
||||
|
||||
struct wayland;
|
||||
struct wl_window {
|
||||
struct terminal *term;
|
||||
|
|
@ -396,7 +398,7 @@ struct wl_window {
|
|||
|
||||
struct zxdg_toplevel_decoration_v1 *xdg_toplevel_decoration;
|
||||
|
||||
enum {CSD_UNKNOWN, CSD_NO, CSD_YES } use_csd;
|
||||
enum csd_mode csd_mode;
|
||||
|
||||
struct {
|
||||
struct wl_surf_subsurf surface[CSD_SURF_COUNT];
|
||||
|
|
@ -433,6 +435,7 @@ struct wl_window {
|
|||
bool is_tiled_bottom:1;
|
||||
bool is_tiled_left:1;
|
||||
bool is_tiled_right:1;
|
||||
enum csd_mode csd_mode;
|
||||
} configure;
|
||||
|
||||
int resize_timeout_fd;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue