Skip to content

Conversation

nicolasnoble
Copy link
Contributor

This acts as both an issue and a proposal for fixing it.

Some of my users are reporting that accessibility applications are installing virtual "monitors" which have a DPI of 0. This software for instance: https://www.freedomscientific.com/products/software/jaws/

Querying all monitors using glfw when the application is installed returns the following DPI for each monitor:

b'Freedom Scientific Accessibility Display Driver' = 0.0, 0.0
b'Generic PnP Monitor' = 1.5, 1.5

This bubbles up into an assert eventually inside of ImGui: mon.DpiScale != 0.0f. The proposed change simply ignores monitors with a dpi scale of 0.0f.

My guess is the monitor exists to "duplicate" the main one, and be able to capture drawing primitives for the purpose of accomplishing its work.

It's going to be difficult for me to test on other backends, given the software is expensive, and it's going to be tough to ask a visually impaired person to test many different backends, but I'm guessing other backends might want the same change.

This acts as both an issue and a proposal for fixing it.

Some of my users are reporting that accessibility applications are installing virtual "monitors" which have a DPI of 0. This software for instance: https://www.freedomscientific.com/products/software/jaws/

Querying all monitors using glfw when the application is installed returns the following DPI for each monitor:

```
b'Freedom Scientific Accessibility Display Driver' = 0.0, 0.0
b'Generic PnP Monitor' = 1.5, 1.5
```

This bubbles up into an assert eventually inside of ImGui: `mon.DpiScale != 0.0f`. The proposed change simply ignores monitors with a dpi scale of `0.0f`.

My guess is the monitor exists to "duplicate" the main one, and be able to capture drawing primitives for the purpose of accomplishing its work.

It's going to be difficult for me to test on other backends, given the software is expensive, and it's going to be tough to ask a visually impaired person to test many different backends, but I'm guessing other backends might want the same change.
@ocornut
Copy link
Owner

ocornut commented Aug 19, 2024

Thanks!
Could you try to get the user to submit a dump of monitor data before the filtering?
I would be curious to see the coordinates of said monitor.

ocornut pushed a commit that referenced this pull request Aug 19, 2024
ocornut added a commit that referenced this pull request Aug 19, 2024
…g. accessibility virtual monitor?). to prevent assert. (#7902)

I am not too confident on this but I believe pushing this is the fastest way we will get feedback.
@nicolasnoble
Copy link
Contributor Author

Here's a dump of all the monitor's status for this user's system:

Name: b'Freedom Scientific Accessibility Display Driver'
ScaleX: 0.0, ScaleY: 0.0
PosX: 0, PosY: 0
SizeW: 169, SizeH: 127

Name: b'Generic PnP Monitor'
ScaleX: 1.5, ScaleY: 1.5
PosX: 0, PosY: 0
SizeW: 293, SizeH: 165

@ocornut
Copy link
Owner

ocornut commented Aug 19, 2024

Thank you! I admit those sizes are surprising too.
I'll close this now and added similar changes to the other backends. I'm guessing we will stumble back on this at some point.

@ocornut ocornut closed this Aug 19, 2024
@nicolasnoble nicolasnoble deleted the patch-3 branch August 19, 2024 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants