X window refresh

Programming, for all ages and all languages.
Post Reply
User avatar
bewing
Member
Member
Posts: 1401
Joined: Wed Feb 07, 2007 1:45 pm
Location: Eugene, OR, US

X window refresh

Post 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.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: X window refresh

Post by Combuster »

Complain to the bochs developers and use the SDL frontend instead. I've always had issues with the X frontend myself.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
bewing
Member
Member
Posts: 1401
Joined: Wed Feb 07, 2007 1:45 pm
Location: Eugene, OR, US

Re: X window refresh

Post 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:
User avatar
Alboin
Member
Member
Posts: 1466
Joined: Thu Jan 04, 2007 3:29 pm
Location: Noricum and Pannonia

Re: X window refresh

Post 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. ;)
C8H10N4O2 | #446691 | Trust the nodes.
Post Reply