From 440c575aa6c47a2258824945fa5442c5a89cfe0f Mon Sep 17 00:00:00 2001 From: Gellert Hegyi Date: Wed, 13 Jul 2022 20:59:57 +0200 Subject: [PATCH] fix: alwaysOnTop browser window option for X11 Linux (#34766) fix: alwaysontop browser window option for x11 --- shell/browser/native_window_views.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/shell/browser/native_window_views.cc b/shell/browser/native_window_views.cc index cb25379b7765a..8b00fec300e15 100644 --- a/shell/browser/native_window_views.cc +++ b/shell/browser/native_window_views.cc @@ -498,6 +498,13 @@ void NativeWindowViews::Show() { if (global_menu_bar_) global_menu_bar_->OnWindowMapped(); #endif + +#if defined(USE_OZONE_PLATFORM_X11) + // On X11, setting Z order before showing the window doesn't take effect, + // so we have to call it again. + if (IsX11()) + widget()->SetZOrderLevel(widget()->GetZOrderLevel()); +#endif } void NativeWindowViews::ShowInactive() {