UndecoratorBis
UndecoratorBis copied to clipboard
Cannot drag scene across display boundary on dual display setup.
Problem with dragging across screen boundary in dual screen setup. Using sample application (UndecoratorSceneDemoTouch.java and UndecoratorSceneDemo.java) to test with both apps can be resized and dragged within the primary screen the app launched in but I cannot drag scene from one display to another. With second screen set to above primary screen, when dragging to second screen window seems to dock on primary and go to full screen.Note: I can use simple app with a decorated scene and drag across displays. FYI. Test environment is Windows 10, Netbeans 8.1, jdk 1,8, dual displays.
Same here. I've got a four screen setup with three screens horiztonal and one display under the last one. I can drag, resize and do whatever I want as long as I don't try to drag the window down to the fourth display. Environment Win 10, JRE 1.8.0x64, IDEA 2016.1.3
Hi thejeed. I have a cludge workaround that should do until a formal patch. Patch the undecoratedcontroller with the modified method below. Comment in line.
void setStageY(Stage stage, double y) {
try {
ObservableList<Screen> screensForRectangle = Screen.getScreensForRectangle(stage.getX(), stage.getY(), stage.getWidth(), stage.getHeight());
if (screensForRectangle.size() > 0) {
Screen screen = screensForRectangle.get(0);
Rectangle2D visualBounds = screen.getVisualBounds();
if (y < visualBounds.getHeight() - 30 && y + SHADOW_WIDTH >= visualBounds.getMinY()) {
stage.setY(y);
}
if (!isMacOS) stage.setY(y); // TO DO MJD: this is cludge to make it work on windows 10 multi screen
}
} catch (Exception e) {
FancyFrame.LOGGER.log(Level.SEVERE, "setStageY issue", e);
}
}
Currently the setStageY method just checks for the current display. I've proposed a change to fix it.
void setStageY(Stage stage, double y) {
try {
ObservableList<Screen> screensForRectangle = Screen.getScreensForRectangle(stage.getX(), stage.getY(), stage.getWidth(), stage.getHeight());
for (Screen screen : screensForRectangle) {
Rectangle2D visualBounds = screen.getVisualBounds();
if (y < visualBounds.getHeight() - 30 && y + SHADOW_WIDTH >= visualBounds.getMinY()) {
stage.setY(y);
}
if (!isMacOS) stage.setY(y); // TO DO MJD: this is cludge to make it work on windows 10 multi screen
}
} catch (Exception e) {
FancyFrame.LOGGER.log(Level.SEVERE, "setStageY issue", e);
}
}
Has this change been proposed in a PR and merged, I am facing the same issue on a Win7 machine :)
I don't think this project is being maintained anymore, I had to do quite some bugfixing to implement it in my project. You can check my fork but it might have some things specific to what I was trying to do. https://github.com/Starkus/Undecorator