fix #1947
This commit is contained in:
parent
b8eb81dcba
commit
fdc04266f6
@ -112,8 +112,8 @@ pub fn make_tray() -> hbb_common::ResultType<()> {
|
|||||||
const LIGHT: &[u8] = include_bytes!("../res/mac-tray-light-x2.png");
|
const LIGHT: &[u8] = include_bytes!("../res/mac-tray-light-x2.png");
|
||||||
const DARK: &[u8] = include_bytes!("../res/mac-tray-dark-x2.png");
|
const DARK: &[u8] = include_bytes!("../res/mac-tray-dark-x2.png");
|
||||||
let icon = match mode {
|
let icon = match mode {
|
||||||
dark_light::Mode::Dark => DARK,
|
dark_light::Mode::Dark => LIGHT,
|
||||||
_ => LIGHT,
|
_ => DARK,
|
||||||
};
|
};
|
||||||
let (icon_rgba, icon_width, icon_height) = {
|
let (icon_rgba, icon_width, icon_height) = {
|
||||||
let image = image::load_from_memory(icon)
|
let image = image::load_from_memory(icon)
|
||||||
@ -147,7 +147,7 @@ pub fn make_tray() -> hbb_common::ResultType<()> {
|
|||||||
crate::platform::macos::hide_dock();
|
crate::platform::macos::hide_dock();
|
||||||
docker_hiden = true;
|
docker_hiden = true;
|
||||||
}
|
}
|
||||||
*control_flow = ControlFlow::Poll;
|
*control_flow = ControlFlow::Wait;
|
||||||
|
|
||||||
if tray_channel.try_recv().is_ok() {
|
if tray_channel.try_recv().is_ok() {
|
||||||
crate::platform::macos::handle_application_should_open_untitled_file();
|
crate::platform::macos::handle_application_should_open_untitled_file();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user