linux: alloy: Fix window resize after context menu dismissal (fixes #3466)

This commit is contained in:
Chris Frank 2023-06-06 12:33:52 +00:00 committed by Marshall Greenblatt
parent 8746aab738
commit 1a97a28b0f
1 changed files with 7 additions and 3 deletions

View File

@ -127,6 +127,7 @@ CefWindowX11::CefWindowX11(CefRefPtr<CefBrowserHostBase> browser,
/*visual_has_alpha=*/nullptr);
xwindow_ = connection_->GenerateId<x11::Window>();
connection_->CreateWindow({
.depth = depth,
.wid = xwindow_,
@ -140,12 +141,15 @@ CefWindowX11::CefWindowX11(CefRefPtr<CefBrowserHostBase> browser,
.background_pixel = 0,
.border_pixel = 0,
.override_redirect = x11::Bool32(false),
.event_mask = x11::EventMask::FocusChange |
x11::EventMask::StructureNotify |
x11::EventMask::PropertyChange,
.colormap = colormap,
});
auto event_mask = x11::EventMask::FocusChange |
x11::EventMask::StructureNotify |
x11::EventMask::PropertyChange;
xwindow_events_ =
std::make_unique<x11::XScopedEventSelector>(xwindow_, event_mask);
connection_->Flush();
DCHECK(ui::X11EventSource::HasInstance());