pycopy-lib
pycopy-lib copied to clipboard
framebuf: unix port: SDL window appears "inactive"
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.
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.
Code to reproduce:
import framebuf
fb = framebuf.FrameBuffer(None, 400, 300, 0)
Here's a screenshot:
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.
Please use framebuf/ex_framebuf.py for testing. Here's how it looks for me:

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.
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.
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
https://github.com/pfalcon/micropython-lib/blob/master/framebuf/example.py