render: remember, and use, last unmaximized size

When the compositor wants us to decide the size (it sends a configure
event with width/height == 0), then use the last unmaximized size, if
there is one.

If there isn't one, use the size from the user configuration.
This commit is contained in:
Daniel Eklöf 2020-02-26 20:59:11 +01:00
parent 77b37fb288
commit ddbfb3676c
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 28 additions and 10 deletions

View file

@ -248,6 +248,8 @@ struct terminal {
int scale;
int width; /* pixels */
int height; /* pixels */
int unmaximized_width; /* last unmaximized size, pixels */
int unmaximized_height; /* last unmaximized size, pixels */
struct {
int left;
int right;