sshahine / JFoenix

JavaFX Material Design Library
MIT License
6.27k stars 1.05k forks source link

JFXDecorator MacOS has problem with primaryStage.isMaximized() on OSX and drag #1192

Open sfxcode opened 3 years ago

sfxcode commented 3 years ago

Drag on Decorator bar does not work as expected because handleDragEventOnDecoratorPane receives always true for primaryStage.isMaximized().

Because in my case stage.getPeer returns always null, the setMaximized function in Stage is useless for me to fix this problem.

    public final void setMaximized(boolean var1) {
        this.maximizedPropertyImpl().set(var1);
        if (this.getPeer() != null) {
            this.getPeer().setMaximized(var1);
        }

    }

Maybe you can extract primaryStage.isMaximized() in a function that can be overwritten. Then i could return always false or use a better function for the isMaximized evaluation and drag works again.

THX for your help in advance,

Greetings,

Tom