-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
B - bugDang, that shouldn't have happenedDang, that shouldn't have happenedDS - appkitAffects the AppKit/macOS backendAffects the AppKit/macOS backendH - help wantedSomeone please save usSomeone please save us
Description
Reproduce: Run VSCode in fullscreen mode, and in the VSCode terminal enter cargo run --example window (in the winit repo).
Expected (and actual in winit 0.24):
The view changes to the desktop and the winit window opens there.
Actual:
The winit window pops up over the fullscreen VSCode, and then the view changes to the desktop (where there is no window).
When did this break?
Work-arounds
Add the following code to after you create the event loop, but before creating your window:
#[cfg(target_os = "macos")]
unsafe {
// work-around for https://github.com/rust-windowing/winit/issues/2051
use cocoa::appkit::NSApplication as _;
cocoa::appkit::NSApp().setActivationPolicy_(
cocoa::appkit::NSApplicationActivationPolicy::NSApplicationActivationPolicyRegular,
);
}kotx
Metadata
Metadata
Assignees
Labels
B - bugDang, that shouldn't have happenedDang, that shouldn't have happenedDS - appkitAffects the AppKit/macOS backendAffects the AppKit/macOS backendH - help wantedSomeone please save usSomeone please save us