[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] BUG: missing VideoResize events after display.set_mode



‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Thursday, September 26, 2019 10:45 AM, Rick van der Meiden <rickvandermeiden@xxxxxxxxx> wrote:
> I've encoutered the following bug.
>
> When handling a VideoResize event, I change the display size using pygame.display.set_mode. After that, it seems (most of the time) subsequent video resize events are not returned by pygame.event.get
>
> Play with window  see see how sometimes events are generated, sometimes not. It seems that when only stretching the window horizontally or vertically, all events are processed, but when stretching horizontally and vertically at the same time (e.g. when you drag a corner of the window) events are not processed.
>
> Note that if the call to display.set_mode is commented out, all resize events are returned by event.get (but the display surface is not resized, so the application is functionally broken).
>

FWIW, with my very simplistic window manager (dwm), the code you provided appears to be working perfectly. So the problem might be your window manager?

Here's a related SE article on the issue that might help you:
https://gamedev.stackexchange.com/questions/124379/how-can-i-resize-sdl2-windows-efficiently

cheers!
mar77i


Sent with ProtonMail Secure Email.