Commit b182b2d4 authored by Nick Diego Yamane's avatar Nick Diego Yamane Committed by Commit Bot

x11: Cancel delayed resize before dispatching close task

crrev.com/c/1771407 moved window closing logic out of DWTHX11 into DWTHPlatform
and XWindow and (likely accidentally) lost delayed resize cancellation before
dispatching actual window close operation [1].

Present CL adds back such logic, now into XWindow::Hide(), which is called from
DWTHPlatform::Close() -> WTH::Hide() -> PlatformWindow/X11Window::Hide(), just
before dispatching real DWTH close task. This is a tentative fix for crashes
reported at crbug.com/1021490, as it has not been possible to reproduce them
locally.

[1] https://crrev.com/c/chromium/src/+/1771407/14/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc#190

Bug: 1021490
Change-Id: Ibee9ad3edd1631901f869f7ebf60bc0d10bc7d0b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1940939Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Nick Yamane <nickdiego@igalia.com>
Cr-Commit-Position: refs/heads/master@{#722524}
parent 9b490132
......@@ -466,6 +466,9 @@ bool XWindow::Hide() {
if (!window_mapped_in_client_)
return false;
// Make sure no resize task will run after the window is unmapped.
CancelResize();
XWithdrawWindow(xdisplay_, xwindow_, 0);
window_mapped_in_client_ = false;
return true;
......
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