RustAudio / baseview

low-level window system interface for audio plugin UIs
Apache License 2.0
259 stars 54 forks source link

Render a background for the open_window example #175

Closed prokopyl closed 3 months ago

prokopyl commented 3 months ago

This PR adds code to render a basic gray background to the opened window in the open_window example.

This is done mostly because X11 can get fairly inconsistent with its order of operations when nothing is rendered to it, which can cause it to just never actually show the window. Nevermind, that was a missing flush call on my end. :sweat_smile:

This also helps making the example a bit more useful, since most users will want to render to their window.

And also it looks nicer. :slightly_smiling_face:

This is done using the softbuffer crate, in the same manner of the open_parented introduced in #172.