mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-22 07:30:24 +00:00
Handled potential native errors better
This commit is contained in:
parent
4a84c07c56
commit
8ea0f98ae9
1 changed files with 8 additions and 3 deletions
|
@ -1,6 +1,7 @@
|
||||||
package io.xpipe.app.core.window;
|
package io.xpipe.app.core.window;
|
||||||
|
|
||||||
import io.xpipe.app.core.AppProperties;
|
import io.xpipe.app.core.AppProperties;
|
||||||
|
import io.xpipe.app.issue.ErrorEvent;
|
||||||
import io.xpipe.app.util.NativeBridge;
|
import io.xpipe.app.util.NativeBridge;
|
||||||
import io.xpipe.app.util.ThreadHelper;
|
import io.xpipe.app.util.ThreadHelper;
|
||||||
import io.xpipe.core.util.ModuleHelper;
|
import io.xpipe.core.util.ModuleHelper;
|
||||||
|
@ -42,9 +43,13 @@ public class NativeMacOsWindowControl {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
lib.get().setAppearance(new NativeLong(nsWindow), seamlessFrame, darkMode);
|
try {
|
||||||
if (seamlessFrame) {
|
lib.get().setAppearance(new NativeLong(nsWindow), seamlessFrame, darkMode);
|
||||||
ThreadHelper.sleep(100);
|
if (seamlessFrame) {
|
||||||
|
ThreadHelper.sleep(100);
|
||||||
|
}
|
||||||
|
} catch (Throwable e) {
|
||||||
|
ErrorEvent.fromThrowable(e).handle();
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue