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
Windows: Pixel lines dropped when showing display_menu #860
Comments
Prior to this, when the menu was shown this would shrink the drawable area while keeping the window size the same. Now, the window size will change while keeping the drawable area the same. The value returned by al_get_display_height is unnaffected by this change. Tested this with window constraints and things appear to work fine. A remaining issue is the user changing the windows theme (thus changing the menu height), which might cause issues. This should be a rare occurence. ex_menu had a workaround for this issue, and my testing has shown that even if kept around, it still appears to work fine with this change in place, suggesting that this change is backwards compatible. Fixes liballeg#860.
I made a change to try to fix this, see #861. The gist is that on Windows, menu is drawn on the same area as you typically draw on, which meant that the drawable area got shrunk (either cut off, or nearest-neighbour scaling which results in thiose missing lines). The change does the resize for you, so hopefully it's not something you should need to worry about now. |
Unfortunately the fix doesn't work for me, it's still squashing the same pixels. |
There was a subtle race condition that I've now fixed. Could you try again? I also tried bintracker locally, and it appeared to fix the issue for me. |
Prior to this, when the menu was shown this would shrink the drawable area while keeping the window size the same. Now, the window size will change while keeping the drawable area the same. The value returned by al_get_display_height is unnaffected by this change. Tested this with window constraints and things appear to work fine. A remaining issue is the user changing the windows theme (thus changing the menu height), which might cause issues. This should be a rare occurence. ex_menu had a workaround for this issue, and my testing has shown that even if kept around, it still appears to work fine with this change in place, suggesting that this change is backwards compatible. Fixes #860.
I can confirm that this fixes the issue. Sorry again for the delay. |
Nice, thanks for confirming! |
When an ALLEGRO_MENU attached to the display, some arbitrary pixel lines (but always the same ones) will be partially skipped when drawing to the display, and mouse coordinates will go out of sync.
It seems at least Win 7 up to Win 10 is affected. Linux and OS X are unaffected.
To reproduce, get the program shown above at https://github.com/utz82/bintracker.
The relevant code to disable the menu is in gui/gui.cpp:110.
As far as I can tell, this is the same issue as mentioned here: https://www.allegro.cc/forums/thread/617007
The text was updated successfully, but these errors were encountered: