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;
|
||||
|
||||
import io.xpipe.app.core.AppProperties;
|
||||
import io.xpipe.app.issue.ErrorEvent;
|
||||
import io.xpipe.app.util.NativeBridge;
|
||||
import io.xpipe.app.util.ThreadHelper;
|
||||
import io.xpipe.core.util.ModuleHelper;
|
||||
|
@ -42,10 +43,14 @@ public class NativeMacOsWindowControl {
|
|||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
lib.get().setAppearance(new NativeLong(nsWindow), seamlessFrame, darkMode);
|
||||
if (seamlessFrame) {
|
||||
ThreadHelper.sleep(100);
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
ErrorEvent.fromThrowable(e).handle();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue