mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-27 15:13:13 -04:00
Don't set the background color when initializing with transparency (#3657)
Setting the background color changes how the window title bar appears, which is something that the application should customize itself if it wants this behaviour (and also, it wasn't set when calling `set_transparent`, so the behaviour wasn't consistent).
This commit is contained in:
committed by
Kirill Chibisov
parent
61bd8172bd
commit
cd6ec19300
@@ -12,7 +12,7 @@ use objc2::{
|
||||
};
|
||||
use objc2_app_kit::{
|
||||
NSAppKitVersionNumber, NSAppKitVersionNumber10_12, NSAppearance, NSApplication,
|
||||
NSApplicationPresentationOptions, NSBackingStoreType, NSColor, NSDraggingDestination,
|
||||
NSApplicationPresentationOptions, NSBackingStoreType, NSDraggingDestination,
|
||||
NSFilenamesPboardType, NSPasteboard, NSRequestUserAttentionType, NSScreen, NSView,
|
||||
NSWindowButton, NSWindowDelegate, NSWindowFullScreenButton, NSWindowLevel,
|
||||
NSWindowOcclusionState, NSWindowOrderingMode, NSWindowSharingType, NSWindowStyleMask,
|
||||
@@ -605,7 +605,6 @@ fn new_window(attrs: &WindowAttributes, mtm: MainThreadMarker) -> Option<Id<Wini
|
||||
|
||||
if attrs.transparent {
|
||||
window.setOpaque(false);
|
||||
window.setBackgroundColor(Some(unsafe { &NSColor::clearColor() }));
|
||||
}
|
||||
|
||||
// register for drag and drop operations.
|
||||
|
||||
Reference in New Issue
Block a user