summaryrefslogtreecommitdiff
path: root/xwayland
diff options
context:
space:
mode:
authorPekka Paalanen <pekka.paalanen@collabora.com>2019-12-05 16:36:17 +0200
committerDaniel Stone <daniel@fooishbar.org>2020-01-29 11:31:11 +0000
commita24989e47bd79cb00978ad3268107b903a578bcb (patch)
tree7a1bcb3a821162d9ee16176b3d12b1e6b1c09fad /xwayland
parent134e14969fab690dd057155f367dff0b4901a2b8 (diff)
downloadweston-a24989e47bd79cb00978ad3268107b903a578bcb.tar.gz
xwm: remove configure_source on dispatch
This function is called also directly from weston_wm_window_set_toplevel(). If configure_source is set at that point, simply resetting the pointer will "leak" the source until it fires and calls this function again. Let's keep the variable up-to-date by removing the source when called, dispatched or not. This removes the second call. I only hope it doesn't cause issues. This is also necessary if we intend to remove the source on window destruction too. Found by inspection. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Diffstat (limited to 'xwayland')
-rw-r--r--xwayland/window-manager.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c
index c23f7107..0fe33dcf 100644
--- a/xwayland/window-manager.c
+++ b/xwayland/window-manager.c
@@ -2687,6 +2687,11 @@ weston_wm_window_configure(void *data)
uint32_t values[4];
int x, y, width, height;
+ if (window->configure_source) {
+ wl_event_source_remove(window->configure_source);
+ window->configure_source = NULL;
+ }
+
weston_wm_window_set_allow_commits(window, false);
weston_wm_window_get_child_position(window, &x, &y);
@@ -2709,8 +2714,6 @@ weston_wm_window_configure(void *data)
XCB_CONFIG_WINDOW_HEIGHT,
values);
- window->configure_source = NULL;
-
weston_wm_window_schedule_repaint(window);
}