Commit fc8b7d05 authored by Olivier Fourdan's avatar Olivier Fourdan Committed by Adam Jackson

xwayland: place a manual redirect on windows

Place a manual redirect on windows on xwl_realize_window() and remove
it on xwl_unrealize_window() to avoid the X11 window manager removing
its redirect before Xwayland has unrealized the window (e.g. if the X11
window manager has terminated unexpectedly)

Suggested by Daniel Stone <daniel@fooishbar.org>
Signed-off-by: default avatarOlivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Daniel Stone's avatarDaniel Stone <daniel@fooishbar.org>
parent 3362422e
......@@ -32,6 +32,7 @@
#include <micmap.h>
#include <misyncshm.h>
#include <compositeext.h>
#include <compint.h>
#include <glx_extinit.h>
#include <os.h>
#include <xserver_poll.h>
......@@ -528,6 +529,8 @@ xwl_realize_window(WindowPtr window)
goto err_surf;
}
compRedirectWindow(serverClient, window, CompositeRedirectManual);
DamageRegister(&window->drawable, xwl_window->damage);
DamageSetReportAfterOp(xwl_window->damage, TRUE);
......@@ -575,6 +578,8 @@ xwl_unrealize_window(WindowPtr window)
xwl_seat_clear_touch(xwl_seat, window);
}
compUnredirectWindow(serverClient, window, CompositeRedirectManual);
screen->UnrealizeWindow = xwl_screen->UnrealizeWindow;
ret = (*screen->UnrealizeWindow) (window);
xwl_screen->UnrealizeWindow = screen->UnrealizeWindow;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment