X11: Fix panic when no monitors are available#1158
X11: Fix panic when no monitors are available#1158Osspial merged 7 commits intorust-windowing:masterfrom
Conversation
|
Fixes #705 by returning a dummy I was unable to reproduce the original issue myself, so I hope that someone still experiencing the issue will test this and let me know if any new bugs occur as a result of this change. |
|
Overall, what would happen if a user unknowingly tries to use this dummy monitor handle as it were the main monitor for their app, by passing it to |
|
@vberger There's an explicit check for the dummy monitor's ID value in These are the dummy monitor's fields: winit/src/platform_impl/linux/x11/monitor.rs Lines 134 to 143 in a94a16e The size of the monitor is zero. I suppose this may cause an application to divide by zero if, e.g., trying to center the window on the current monitor. I could instead give the dummy monitor a size of |
|
cc @jarredbarber (of #1007) and @chutz (of #705). Does this branch fix the issues you reported? |
|
Replaced a |
|
Should be good to merge when CI is done? |
|
@zegentzy Yes, I think so. |
cargo fmthas been run on this branchCHANGELOG.mdif knowledge of this change could be valuable to users