From 1f06b1e01e23c4816775275bbe46b23dda91c2f5 Mon Sep 17 00:00:00 2001 From: Ramez Ragaa Date: Thu, 31 Oct 2024 02:50:44 +0300 Subject: [PATCH] fix(x11): Window.Activate() should immediately raise the window --- src/Uno.UI.Runtime.Skia.X11/X11WindowWrapper.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Uno.UI.Runtime.Skia.X11/X11WindowWrapper.cs b/src/Uno.UI.Runtime.Skia.X11/X11WindowWrapper.cs index a7943d1ea115..27e2b2707c42 100644 --- a/src/Uno.UI.Runtime.Skia.X11/X11WindowWrapper.cs +++ b/src/Uno.UI.Runtime.Skia.X11/X11WindowWrapper.cs @@ -67,6 +67,7 @@ public override void Activate() var x11Window = _host.RootX11Window; using var lockDiposable = X11Helper.XLock(x11Window.Display); _ = XLib.XRaiseWindow(x11Window.Display, x11Window.Window); + _ = XLib.XFlush(x11Window.Display); // Important! Otherwise X commands will sit waiting to be flushed, and since the window is not activated, there are no new X commands being sent to force a flush. // We could send _NET_ACTIVE_WINDOW as well, although it doesn't seem to be needed (and only works with EWMH-compliant WMs) // XClientMessageEvent xclient = default;