Unable to project to one of three monitors on Windows
Bug Description I can use the projection feature on only two of the three displays connected to my computer. They appear in the "SCREENS" list as follows:
\\.\DISPLAY1
\\.\DISPLAY2
\\.\DISPLAY5
When the main window is on my primary screen, the display 1 option is grayed out. When it's on my Wacom display, the display 5 option is grayed out. And when it is on my teleprompter display, the display 2 option is grayed out.
Unfortunately, it's the teleprompter display that I can't project onto. When I try projecting to display 2, it has the same effect as projecting to display 1. That's a bit annoying when the application window is on display 1 because the projection screen overlaps the application, and I can't just select "off" in the sequence of modes. I have to cycle through them.
Steps to Reproduce
- Open application
- Enable projection under the Screens display
- Restart application
- Select the teleprompter's display
Expected behavior Projection on the teleprompter's display
Detailed description of display configuration (if applicable) The display I'm using in the teleprompter is a generic display off of Amazon connected over HDMI, and it works fine as an extended display. I can drag applications to that display, same as I can on my secondary display.
Screenshots (optional) Feel free to request specific screenshots, but I don't know of any that would be helpful.
Device information
- QPrompt Version: 1.1.6
- Operating System: Windows 10 Pro
Additional context
Please note: Although two are connected through a Gigabyte GeForce RTX 4060 Ti graphics card and one is connected through the integrated HDMI port on the motherboard, I swapped the secondary display with the teleprompter just to rule out problems with projecting over a different graphics card than the one the main window is on.
Thank you for taking your time to report this bug.
Projecting across multiple GPUs is not supported due to the textures in one GPU being inaccessible from other GPUs. Having said that, I don't think your issue is because of this. If it were, the app probably would've crashed.
The graying out of screens is done exclusively on Windows to prevent Windows specific crashes. Linux is unaffected, MacOS on Apple Silicon can only project up to two screens at once.
Your issue seems like a bug in the logic for graying out the display the main window is currently at. Unfortunately, I don't have the time to replicate your issue. Instead I'm writing a new implementation of this feature, because the current implementation is incompatible with more current versions of an underlying framework that we must update to keep things future proof.
I will keep this issue open, but it will likely not be addressed until the new implementation is completed. There's no timeline for this and progress has come about slowly. Consider using any of the Linux versions of QPrompt if you need this issue resolved today.
No worries. Hopefully the new implementation resolves the problem naturally.
But just to clarify: the graying seems to work as expected. The problem is that the projection sent to the teleprompter's display appears on the primary display instead - even when the app's main window is also on the primary display and when both displays are connected to the same GPU. The app does not crash even when projecting on the secondary display that is connected to the other GPU. Unfortunately, I'm not sure how someone could reproduce this issue because I'm not sure what makes it different from any other multi-monitor setup. Maybe someone else will see this issue and happen to run into the same problem.
Thanks for the clarification. That gives me a good idea of where to look.
Screen projections removed from v1.2/2.0 codebase and future implementation in the works won't be affected by this issue, therefore there's no need to keep this issue open.
The new implementation of screen projections turned out not to be so different from the code that went away as I had thought it would be. Therefore, there is a chance this bug could be replicated using QPrompt v2.0. I will re-open this ticket so this doesn't go without checking.
Bug replicated. This issue happens whenever the order in which the OS sees displays doesn't match the order of their layout from left to right in the operating system settings.
Only when monitor 1 is mapped to position 1, monitor 2 to position 2 and monitor 3 to position 3, the issue does not occur.
The misplacement of screen projections appears to stem from a bug in the Qt framework. We're not modifying the Qt framework for QPrompt v2.0 because we don't control it for all of our distribution methods, so this will have to be fixed in the upstream project for a future version of QPrompt to benefit from it.
I'm adding a crash tag to this. In some configurations the projected screens show one on top of another and if you move the main window bellow one of those misplaced projections it may cause QPrompt to crash since Windows might not render the main window for the projection windows to copy an image from, leading the scene graph to sometimes access illegal space from the memory.
This is easiest to replicate if the prompter is animating as you move one window bellow the others.
The crash ended up being due to something else that just happen to occur at the same time. Filing as a separate issue from this.