block moving and resizing in fullscreen

This commit is contained in:
Martin Beyer
2021-08-24 19:21:53 +02:00
parent 31ca102263
commit 957640b1ba
3 changed files with 15 additions and 8 deletions

View File

@@ -73,6 +73,8 @@ public class MainWindowTitleController implements FxController {
}
});
titleBar.setOnMouseDragged(event -> {
//TODO should it be possible to move the window, when in fullscreen?
if (window.isFullScreen()) return;
window.setX(event.getScreenX() - xOffset);
window.setY(event.getScreenY() - yOffset);
});

View File

@@ -152,4 +152,9 @@ public class ResizeController implements FxController {
settings.windowXPositionProperty().setValue(window.getX());
}
public boolean isShowResizingArrows(){
//If in fullscreen resizing should not be possible
return window.isFullScreen();
}
}