mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-03-10 02:26:21 -04:00
Revert "fix up macOS fullscreen mode (kinda)"
This reverts commit 983a4b6d93.
This commit is contained in:
@@ -2,15 +2,15 @@ use tauri::{GlobalWindowEvent, Runtime, Window, Wry};
|
||||
|
||||
pub(crate) fn handle_window_event(event: GlobalWindowEvent<Wry>) {
|
||||
match event.event() {
|
||||
tauri::WindowEvent::Focused(_focus) => {
|
||||
// let fullscreen = event.window().is_fullscreen().unwrap_or(false);
|
||||
tauri::WindowEvent::Resized(_size) => {
|
||||
let fullscreen = event.window().is_fullscreen().unwrap_or(false);
|
||||
|
||||
// println!("fullscreen, {}", fullscreen);
|
||||
println!("fullscreen, {}", fullscreen);
|
||||
|
||||
// #[cfg(target_os = "macos")]
|
||||
// event
|
||||
// .window()
|
||||
// .set_transparent_titlebar(!fullscreen, !fullscreen);
|
||||
#[cfg(target_os = "macos")]
|
||||
event
|
||||
.window()
|
||||
.set_transparent_titlebar(!fullscreen, !fullscreen);
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
@@ -56,15 +56,10 @@ impl<R: Runtime> WindowExt for Window<R> {
|
||||
let id = self.ns_window().unwrap() as cocoa::base::id;
|
||||
|
||||
let mut style_mask = id.styleMask();
|
||||
// println!("existing style mask, {:#?}", style_mask);
|
||||
style_mask.set(
|
||||
NSWindowStyleMask::NSFullSizeContentViewWindowMask,
|
||||
transparent,
|
||||
);
|
||||
style_mask.set(
|
||||
NSWindowStyleMask::NSTexturedBackgroundWindowMask,
|
||||
transparent,
|
||||
);
|
||||
style_mask.set(
|
||||
NSWindowStyleMask::NSUnifiedTitleAndToolbarWindowMask,
|
||||
transparent && large,
|
||||
|
||||
@@ -36,6 +36,7 @@ import ExperimentalSettings from './screens/settings/ExperimentalSettings';
|
||||
|
||||
import { TagScreen } from './screens/Tag';
|
||||
|
||||
|
||||
const queryClient = new QueryClient();
|
||||
|
||||
export const AppPropsContext = React.createContext<AppProps | null>(null);
|
||||
@@ -61,10 +62,9 @@ function AppLayout() {
|
||||
const [hasWindowBorder, setHasWindowBorder] = useState(true);
|
||||
|
||||
useEffect(() => {
|
||||
// no longer need this with our window mask fixes
|
||||
// if (appPropsContext?.platform === 'macOS') {
|
||||
// setIsWindowRounded(false);
|
||||
// }
|
||||
if (appPropsContext?.platform === 'macOS') {
|
||||
setIsWindowRounded(true);
|
||||
}
|
||||
if (appPropsContext?.platform === 'browser') {
|
||||
setHasWindowBorder(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user