mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-09-30 00:56:56 +13:00
Asahi Linux fixes
This commit is contained in:
parent
270ef73cc1
commit
9b9fed3ec6
2 changed files with 7 additions and 3 deletions
|
@ -111,14 +111,18 @@ public class AppWindowHelper {
|
|||
Alert a = AppWindowHelper.createEmptyAlert();
|
||||
AppFont.normal(a.getDialogPane());
|
||||
var s = (Stage) a.getDialogPane().getScene().getWindow();
|
||||
a.getDialogPane().getScene().getWindow().setOnShown(event -> {
|
||||
clampWindow((Stage) a.getDialogPane().getScene().getWindow()).ifPresent(rectangle2D -> {
|
||||
s.setOnShown(event -> {
|
||||
// Force recomputation of window bounds to properly position it on some linux systems
|
||||
s.setX(s.getX() + 1);
|
||||
|
||||
clampWindow(s).ifPresent(rectangle2D -> {
|
||||
s.setX(rectangle2D.getMinX());
|
||||
s.setY(rectangle2D.getMinY());
|
||||
// Somehow we have to set max size as setting the normal size does not work?
|
||||
s.setMaxWidth(rectangle2D.getWidth());
|
||||
s.setMaxHeight(rectangle2D.getHeight());
|
||||
});
|
||||
event.consume();
|
||||
});
|
||||
a.getDialogPane().getScene().addEventFilter(KeyEvent.KEY_PRESSED, event -> {
|
||||
if (OsType.getLocal().equals(OsType.LINUX) || OsType.getLocal().equals(OsType.MACOS)) {
|
||||
|
|
|
@ -8,4 +8,4 @@ You can view the development status, report issues, and more at the following pl
|
|||
- [Slack Server](https://join.slack.com/t/XPipe/shared_invite/zt-1awjq0t5j-5i4UjNJfNe1VN4b_auu6Cg)
|
||||
- [Email me](mailto://crschnick@xpipe.io)
|
||||
|
||||
Note that the XPipe project currently is a one-man show, but I still try to respond everything in time.
|
||||
Note that the XPipe project currently is a one-man show, but I still try to respond to everything in time.
|
||||
|
|
Loading…
Reference in a new issue