diff options
Diffstat (limited to 'libdecor/demo')
| -rw-r--r-- | libdecor/demo/demo.c | 14 | ||||
| -rw-r--r-- | libdecor/demo/egl.c | 1 |
2 files changed, 9 insertions, 6 deletions
diff --git a/libdecor/demo/demo.c b/libdecor/demo/demo.c index ff285cc2f..26d955c18 100644 --- a/libdecor/demo/demo.c +++ b/libdecor/demo/demo.c @@ -2,6 +2,7 @@ * Copyright © 2011 Benjamin Franzke * Copyright © 2010 Intel Corporation * Copyright © 2018 Jonas Ådahl + * Copyright © 2019 Christian Rauch * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -1117,6 +1118,13 @@ handle_configure(struct libdecor_frame *frame, enum libdecor_window_state window_state; struct libdecor_state *state; + /* Update window state first for the correct calculations */ + if (!libdecor_configuration_get_window_state(configuration, + &window_state)) + window_state = LIBDECOR_WINDOW_STATE_NONE; + + window->window_state = window_state; + if (!libdecor_configuration_get_content_size(configuration, frame, &width, &height)) { width = window->content_width; @@ -1129,12 +1137,6 @@ handle_configure(struct libdecor_frame *frame, window->configured_width = width; window->configured_height = height; - if (!libdecor_configuration_get_window_state(configuration, - &window_state)) - window_state = LIBDECOR_WINDOW_STATE_NONE; - - window->window_state = window_state; - state = libdecor_state_new(width, height); libdecor_frame_commit(frame, state, configuration); libdecor_state_free(state); diff --git a/libdecor/demo/egl.c b/libdecor/demo/egl.c index 3d7331645..8963ea457 100644 --- a/libdecor/demo/egl.c +++ b/libdecor/demo/egl.c @@ -2,6 +2,7 @@ * Copyright © 2011 Benjamin Franzke * Copyright © 2010 Intel Corporation * Copyright © 2018 Jonas Ådahl + * Copyright © 2019 Christian Rauch * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the |
