pycopy-lib icon indicating copy to clipboard operation
pycopy-lib copied to clipboard

framebuf: unix port: SDL window appears "inactive"

Open crteensy opened this issue 6 years ago • 6 comments

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.

crteensy avatar Dec 27 '18 20:12 crteensy

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.

pfalcon avatar Dec 27 '18 20:12 pfalcon

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.

crteensy avatar Dec 27 '18 21:12 crteensy

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 avatar Dec 27 '18 21:12 pfalcon

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 avatar Dec 27 '18 21:12 pfalcon

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 avatar Dec 27 '18 21:12 pfalcon

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

pfalcon avatar Dec 27 '18 21:12 pfalcon