summaryrefslogtreecommitdiff
path: root/present/present_screen.c
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2023-02-02 12:26:27 -0500
committerOlivier Fourdan <ofourdan@redhat.com>2023-04-24 10:13:27 +0200
commitb98fc07d3442a289c6bef82df50dd0a2d01de71a (patch)
tree97e63464d70bb02f2253eacfe215a48451a7bfdb /present/present_screen.c
parent7c791b15504cc86a929acaa88161f012cdbba59f (diff)
downloadxserver-server-21.1-branch.tar.gz
present: Send a PresentConfigureNotify event for destroyed windowsserver-21.1-branch
This enables fixing a deadlock case on the client side, where the client ends up blocked waiting for a Present event that will never come because the window was destroyed. The new PresentWindowDestroyed flag allows the client to avoid blocking indefinitely. Signed-off-by: Adam Jackson <ajax@redhat.com> See-also: https://gitlab.freedesktop.org/mesa/mesa/-/issues/116 See-also: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6685 Reviewed-by: Michel Dänzer <mdaenzer@redhat.com> (cherry picked from commit 462b06033e66a32308d940eb5fc47f5e4c914dc0)
Diffstat (limited to 'present/present_screen.c')
-rw-r--r--present/present_screen.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/present/present_screen.c b/present/present_screen.c
index 15684eda4..2c29aafd2 100644
--- a/present/present_screen.c
+++ b/present/present_screen.c
@@ -93,6 +93,15 @@ present_destroy_window(WindowPtr window)
present_screen_priv_ptr screen_priv = present_screen_priv(screen);
present_window_priv_ptr window_priv = present_window_priv(window);
+ present_send_config_notify(window,
+ window->drawable.x,
+ window->drawable.y,
+ window->drawable.width,
+ window->drawable.height,
+ window->borderWidth,
+ window->nextSib,
+ PresentWindowDestroyed);
+
if (window_priv) {
present_clear_window_notifies(window);
present_free_events(window);
@@ -123,7 +132,7 @@ present_config_notify(WindowPtr window,
ScreenPtr screen = window->drawable.pScreen;
present_screen_priv_ptr screen_priv = present_screen_priv(screen);
- present_send_config_notify(window, x, y, w, h, bw, sibling);
+ present_send_config_notify(window, x, y, w, h, bw, sibling, 0);
unwrap(screen_priv, screen, ConfigNotify);
if (screen->ConfigNotify)