pfalcon / pycopy-lib

Standard library of the Pycopy project, minimalist and light-weight Python language implementation
https://github.com/pfalcon/pycopy
Other
247 stars 70 forks source link

framebuf: unix port: SDL window appears "inactive" #24

Open crteensy opened 5 years ago

crteensy commented 5 years ago

OS: Ubuntu 16.04 LTS When I create a FrameBuffer, a corresponding SDL window is created. However, it appears to be inactive or "grayed out" which is a bit annoying because colors appear different.

pfalcon commented 5 years ago

Thanks for the report, but I'm not sure what's being reported here. For me, it (SDL window?) doesn't appear to be "grayed out". You would need to explain better and/or provide steps to reproduce, screenshots, etc.

crteensy commented 5 years ago

Code to reproduce:

import framebuf
fb = framebuf.FrameBuffer(None, 400, 300, 0)

Here's a screenshot: image This is apparently a known issue with SDL on ubuntu: https://stackoverflow.com/questions/18167542/sdl-window-seemingly-improperly-being-marked-unresponsive-by-os I tried to apply the suggested fixes but since I never used SDL or usdl before I didn't succeed.

pfalcon commented 5 years ago

Please use framebuf/ex_framebuf.py for testing. Here's how it looks for me:

screenshot from 2018-12-28 00-50-10

Nothing is ever grayed out. Window's close button doesn't work, that's expected. You need to go to console where you started the app, and press ctrl+c there.

I encourage you to try to implement the calls mentioned in the SO post yourself, if not, I'll look into that when I have time.

pfalcon commented 5 years ago

I'm using MATE on Ubuntu 18.04. But I believe initial version of the module was developed yet on 16.04, with MATE too of course.

pfalcon commented 5 years ago

Please use framebuf/ex_framebuf.py for testing.

LOL, it's not even committed. Thanks for looking into this - when someone else but yourself gives it a try, a lot of goofs are uncovered ;-).

It's now there, as framebuf/example.py

pfalcon commented 5 years ago

https://github.com/pfalcon/micropython-lib/blob/master/framebuf/example.py