From 1d1550fb350bfe0abfae0d0392a9caac9f3c144d Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Thu, 15 Dec 2022 16:03:13 +0100 Subject: [PATCH] Move window to front on full screen This should be happening implicitly, but isn't always for some reason on macOS 13. --- vncviewer/cocoa.mm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vncviewer/cocoa.mm b/vncviewer/cocoa.mm index e8b202d6..d801a106 100644 --- a/vncviewer/cocoa.mm +++ b/vncviewer/cocoa.mm @@ -107,6 +107,11 @@ int cocoa_capture_displays(Fl_Window *win) [nsw setLevel:CGShieldingWindowLevel()]; + // We're not getting put in front of the shielding window in many + // cases on macOS 13, despite setLevel: being documented as also + // pushing the window to the front. So let's explicitly move it. + [nsw orderFront:nsw]; + return 0; } -- 2.39.5