diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-08-27 10:15:40 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-08-27 10:15:40 +0200 |
| commit | 28981f6fd3971aaf7ff6527ee1cdeb9d886c4a4a (patch) | |
| tree | a5b4f960533aca1854bd696cb01715293f1e42c5 /libdecor/src | |
| parent | 6a546d4e9c81f302d7341fa27639795a353c8bba (diff) | |
Wayland/Libdecor: update from upstream
These changes fix issue #474.
Diffstat (limited to 'libdecor/src')
| -rw-r--r-- | libdecor/src/libdecor.c | 3 | ||||
| -rw-r--r-- | libdecor/src/plugins/gtk/libdecor-gtk.c | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/libdecor/src/libdecor.c b/libdecor/src/libdecor.c index c4b5b1e99..9bd418fe2 100644 --- a/libdecor/src/libdecor.c +++ b/libdecor/src/libdecor.c @@ -300,6 +300,9 @@ libdecor_configuration_get_content_size(struct libdecor_configuration *configura if (frame_has_visible_client_side_decoration(frame) && plugin->priv->iface->frame_get_border_size) { int left, right, top, bottom; + + /* Update window state for correct border size calculation */ + frame->priv->window_state = configuration->window_state; if (!plugin->priv->iface->frame_get_border_size( plugin, frame, configuration, &left, &right, &top, &bottom)) return false; diff --git a/libdecor/src/plugins/gtk/libdecor-gtk.c b/libdecor/src/plugins/gtk/libdecor-gtk.c index 33d442c41..53cc81339 100644 --- a/libdecor/src/plugins/gtk/libdecor-gtk.c +++ b/libdecor/src/plugins/gtk/libdecor-gtk.c @@ -1728,6 +1728,9 @@ libdecor_plugin_gtk_frame_get_border_size(struct libdecor_plugin *plugin, if (bottom) *bottom = 0; if (top) { + /* Redraw decoration to ensure size will be up-to-date */ + draw_decoration((struct libdecor_frame_gtk *) frame); + GtkWidget *header = ((struct libdecor_frame_gtk *)frame)->header; enum decoration_type type = window_state_to_decoration_type(window_state); |
