Page 1 of 1

X window refresh

Posted: Fri Dec 05, 2008 3:43 am
by bewing
I'm having a little trouble with the Linux GUI version of bochs.

Bochs has one X top-level window (called the VGAW). My GUI frontend has another. My window is working fine, but the VGAW is not updating properly. In fact: when bochs is sleeping (waiting for user input), the VGAW is not being updated at all. If part of the VGAW is overpainted and then uncovered, it stays a black rectangle until the user types a command (minutes or hours later). I've tried just sending an XFlush command every half second to the window, but it didn't do anything.

So: is there some generic series of steps that I need to do to force an X window to refresh? Do I need to "queue a draw event?" If anyone can give me a set of X functions to call, that would be great -- because I know almost nothing about X windows.

Re: X window refresh

Posted: Fri Dec 05, 2008 4:26 am
by Combuster
Complain to the bochs developers and use the SDL frontend instead. I've always had issues with the X frontend myself.

Re: X window refresh

Posted: Fri Dec 05, 2008 6:09 pm
by bewing
I used GTK (Xlib based) to build my GUI frontend, so I don't think I can use the SDL interface for the VGAW? Or do you think they would actually mix in a congenial way? I can certainly try it. I suppose that it would add an entire library and bloat the code a bit more, but who cares if it works, right? :lol:

And I'm afraid that Stanislav is not a GUI programmer, so complaining to him doesn't help much. :wink:

Re: X window refresh

Posted: Fri Dec 05, 2008 6:58 pm
by Alboin
I suppose you could try XSendEvent.

You'll probably be looking for an Exposure event to use with that as well.

I'm not sure if that will work, however. In my experience, xlib is rather 'sensitive' to 'hacks'...

Good Luck. ;)