try out hide_docker
This commit is contained in:
parent
3f53146c7e
commit
9648c57f67
@ -193,6 +193,7 @@ pub fn core_main() -> Option<Vec<String>> {
|
|||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
{
|
{
|
||||||
std::thread::spawn(move || crate::start_server(true));
|
std::thread::spawn(move || crate::start_server(true));
|
||||||
|
crate::platform::macos::hide_dock();
|
||||||
crate::tray::make_tray();
|
crate::tray::make_tray();
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
@ -242,6 +243,8 @@ pub fn core_main() -> Option<Vec<String>> {
|
|||||||
#[cfg(feature = "flutter")]
|
#[cfg(feature = "flutter")]
|
||||||
crate::flutter::connection_manager::start_listen_ipc_thread();
|
crate::flutter::connection_manager::start_listen_ipc_thread();
|
||||||
crate::ui_interface::start_option_status_sync();
|
crate::ui_interface::start_option_status_sync();
|
||||||
|
#[cfg(target_os = "macos")]
|
||||||
|
crate::platform::macos::hide_dock();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//_async_logger_holder.map(|x| x.flush());
|
//_async_logger_holder.map(|x| x.flush());
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
use super::{CursorData, ResultType};
|
use super::{CursorData, ResultType};
|
||||||
use cocoa::{
|
use cocoa::{
|
||||||
|
appkit::{NSApp, NSApplication, NSApplicationActivationPolicy::*},
|
||||||
base::{id, nil, BOOL, NO, YES},
|
base::{id, nil, BOOL, NO, YES},
|
||||||
foundation::{NSDictionary, NSPoint, NSSize, NSString},
|
foundation::{NSDictionary, NSPoint, NSSize, NSString},
|
||||||
};
|
};
|
||||||
@ -550,3 +551,9 @@ pub fn get_double_click_time() -> u32 {
|
|||||||
// to-do: https://github.com/servo/core-foundation-rs/blob/786895643140fa0ee4f913d7b4aeb0c4626b2085/cocoa/src/appkit.rs#L2823
|
// to-do: https://github.com/servo/core-foundation-rs/blob/786895643140fa0ee4f913d7b4aeb0c4626b2085/cocoa/src/appkit.rs#L2823
|
||||||
500 as _
|
500 as _
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn hide_dock() {
|
||||||
|
unsafe {
|
||||||
|
NSApp().setActivationPolicy_(NSApplicationActivationPolicyAccessory);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user