# SDL - how to enable window (surface) repaint

**URL:** <https://www.ruby-forum.com/t/sdl-how-to-enable-window-surface-repaint/47865>\
**Category:** Ruby\
**Created:** [November 14, 2005, 6:17pm UTC](https://www.ruby-forum.com/t/sdl-how-to-enable-window-surface-repaint/47865 "2005-11-14T18:17:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bouncer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/9d8465/32.png) [@bouncer](https://www.ruby-forum.com/u/bouncer)\
**Post date:** [November 14, 2005, 6:17pm UTC](https://www.ruby-forum.com/t/sdl-how-to-enable-window-surface-repaint/47865/1 "2005-11-14T18:17:26Z")

</div>

hello,

i am using sdl library from [Ruby/SDL](http://www.kmc.gr.jp/~ohai/rubysdl.en.html).

the problem is that if the sdl window is overlapped with another  
window(s)  
and then “switched” back, the surface of sdl has blank portion (where  
the  
overlapping window was.

i am guessing that i need to hook into some event and do refresh but  
how? i  
googled but not successfully…

vlad

---

<div class="post-metadata">

**Author:** ![bouncer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/9d8465/32.png) [@bouncer](https://www.ruby-forum.com/u/bouncer)\
**Post date:** [November 14, 2005, 6:23pm UTC](https://www.ruby-forum.com/t/sdl-how-to-enable-window-surface-repaint/47865/2 "2005-11-14T18:23:27Z")

</div>

forgot to tell - i am drawing pixels…

vlad

---

<div class="post-metadata">

**Author:** ![bouncer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/9d8465/32.png) [@bouncer](https://www.ruby-forum.com/u/bouncer)\
**Post date:** [November 14, 2005, 6:35pm UTC](https://www.ruby-forum.com/t/sdl-how-to-enable-window-surface-repaint/47865/3 "2005-11-14T18:35:29Z")

</div>

solved, all it needed was an event loop, my humble apologies for wasted  
bandwitch and your time…

vlad
