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: Olivier Fourdan <ofourdan@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
This commit is contained in:
parent
3362422e84
commit
fc8b7d05e7
|
@ -32,6 +32,7 @@
|
||||||
#include <micmap.h>
|
#include <micmap.h>
|
||||||
#include <misyncshm.h>
|
#include <misyncshm.h>
|
||||||
#include <compositeext.h>
|
#include <compositeext.h>
|
||||||
|
#include <compint.h>
|
||||||
#include <glx_extinit.h>
|
#include <glx_extinit.h>
|
||||||
#include <os.h>
|
#include <os.h>
|
||||||
#include <xserver_poll.h>
|
#include <xserver_poll.h>
|
||||||
|
@ -528,6 +529,8 @@ xwl_realize_window(WindowPtr window)
|
||||||
goto err_surf;
|
goto err_surf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
compRedirectWindow(serverClient, window, CompositeRedirectManual);
|
||||||
|
|
||||||
DamageRegister(&window->drawable, xwl_window->damage);
|
DamageRegister(&window->drawable, xwl_window->damage);
|
||||||
DamageSetReportAfterOp(xwl_window->damage, TRUE);
|
DamageSetReportAfterOp(xwl_window->damage, TRUE);
|
||||||
|
|
||||||
|
@ -575,6 +578,8 @@ xwl_unrealize_window(WindowPtr window)
|
||||||
xwl_seat_clear_touch(xwl_seat, window);
|
xwl_seat_clear_touch(xwl_seat, window);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
compUnredirectWindow(serverClient, window, CompositeRedirectManual);
|
||||||
|
|
||||||
screen->UnrealizeWindow = xwl_screen->UnrealizeWindow;
|
screen->UnrealizeWindow = xwl_screen->UnrealizeWindow;
|
||||||
ret = (*screen->UnrealizeWindow) (window);
|
ret = (*screen->UnrealizeWindow) (window);
|
||||||
xwl_screen->UnrealizeWindow = screen->UnrealizeWindow;
|
xwl_screen->UnrealizeWindow = screen->UnrealizeWindow;
|
||||||
|
|
Loading…
Reference in New Issue