New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Let the user specify which monitor OPENRNDR uses #303
Conversation
Would love to hear how it fares on macOS and Linux distributions. I've only been able to test this on Windows. |
How and what should we test? I did
Then tried this program
What can I try next? Maybe you can add debug messages to the code and I see what comes out on Linux? |
I wonder if it's because I'm using a tiling window manager (i3wm). I'll try with the default. |
That was it. With the default Ubuntu wm it works as expected and I can choose the monitor with 0 or 1, both normal and full screen. So with i3wm, I don't know if there's an issue in glfw or in this code. It's not the first time that something in OPENRNDR behaves different with the tiling window manager I use. There are 6 open issues in their repo, one dealing with multi monitor setup. |
That's interesting, and yes I should have specified what to test. I've mainly been looking
|
I didn't try 3, the others did work in the Ubuntu wm. I'll try 3 this evening (too lazy to close all apps, log out and log in again, then reverse). Meanwhile I was trying this
which prints the expected values even if it doesn't work as expected in i3wm. At least it does get the right screen resolutions.
|
Trying to figure out what OPENRNDR knows about my window position...
I see that |
That could very well be the case, you could try changing this window hint and see if that fixes it. I wouldn't change it in the PR because I feel like it would introduce some visual glitches for everyone but it could verify the cause of the problem. |
Leaving this note here so it can be found together with the above: Changing But instead of being smart and trying to detect window managers, maybe it's safer to allow to specify in some way |
return when (applicationProperty) { | ||
null, "", "ApplicationGLFW" -> Application::class.java.classLoader.loadClass("org.openrndr.internal.gl3.ApplicationGLFWGL3") | ||
"ApplicationEGL" -> Application::class.java.classLoader.loadClass("org.openrndr.internal.gl3.ApplicationEGLGL3") | ||
else -> throw IllegalArgumentException("Unknown value '${applicationProperty}' provided for org.openrndr.application") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these names intuitive for the user? Should we instead simply use "GLFW" and "EGL"?
2004130
to
73ddd3c
Compare
This was accidentally omitted from the previous commit
Switches stackPush().let {} out for stackPush.use {}
Introduce `org.openrndr.application` VM property to specify graphics backend. Clarify synchronous/asynchronous application error messages. Stop initializing Application twice in certain conditions.
Otherwise there's nothing preventing the user from calling them.
Due to it not respecting window placement otherwise.
This is an alternative to the two-stage initialization in Application implementations which made things far too fragile.
cf730f0
to
a3058ca
Compare
This is a bit trickier than I first assumed. It's a complicated feature to test so I will initially be publishing this PR as a draft until I'm more confident it can handle all the edge cases.
Fixes #113. Fixes #304.