GTK+ Forums Forum Index GTK+ Forums
Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Expose problem

 
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming
Author Message
dorakeen



Joined: 30 Apr 2008
Posts: 1

PostPosted: Wed Apr 30, 2008 4:23 pm    Post subject: Expose problem Reply with quote

Hi everybody!

I have an expose problem in my C application ...

First I created a main window
topWindow = gtk_window_new(GTK_WINDOW_TOPLEVEL);

then an horizontal box in the window
topHBox = gtk_hbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (topWindow), topHBox);

and two vertical boxes in the horizontal one
sdlVBox = gtk_vbox_new(FALSE, 0);
gtk_box_pack_start(GTK_BOX(topHBox), sdlVBox, FALSE, FALSE, 0);
rightVBox = gtk_vbox_new (FALSE, 0);
gtk_box_pack_end (GTK_BOX (topHBox), rightVBox, FALSE, FALSE, 0);

in the sdlVBox I putted a SDL widget (got from sourceforge projects gtksdl), in the right box there's various stuff to "control" the videooutput on the left side. There's two thread more than the gtk_main():
- reading thread: to get video data from file/net/fg and put in a buffer
- writing thread: to get video data from the buffer and put on the screen with SDL_DisplayYUVOverlay().

Everything works fine: I see video running on the left side and I can controll it from right one. BUT sometimes an expose event to topWindow "delete" my video, I suppose that topWindow background rewriting pass-over my sdl widget.
I'm absoluty sure that the writing thread is still writing on the screen but all that I can see is the window background.
Actually to see again my video running on the screen I need an ALT+TAB keyboard event to switch between the other (x)windows ...

Anyone can help me ?!

Thanks
Back to top
Display posts from previous:   
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group
CodeBB 1.0 Beta 2
Protected by Anti-Spam ACP