RE: How to redraw the application window of a multithreaded GTK a pp?



hello
maybe that doing a gdk_window_clear(MyDrawingArea->window);
could work; just try to put it just after the call to
gdk_window_set_back_pixmap()
(of course replace "MyDrawingArea" by ur drawingarea name after casting it
to GtKWidget*)
it should force the page flipping ,and reveal ur back buffer content
 i guess it will work

ps: sorry if my english is so bad

regards

-----Message d'origine-----
De : Joerg Vogler [mailto:vogler panasonic de]
Envoyé : mercredi 25 septembre 2002 18:54
À : Olexiy Avramchenko
Cc : GTK Mailing List
Objet : RE: How to redraw the application window of a multithreaded GTK
app?


> From: Olexiy Avramchenko [mailto:ath beast stu cn ua]
> Sent: Wednesday, September 25, 2002 12:05 PM
>
> 1. Under the X you can use XShm shared pixmap. You can read/write
> its memory
> like an image's memory but its faster to draw it.
> 2. gdk_widget_queue_draw() is not the best way to update the screen in
> your case.
> You have to directly call gdk_draw_* in drawing thread (dont forget to
> call gdk_flush()
> to sync X server).
> 3. Set the shared pixmap as the background of the drawing area window to
> avoid
> handling "expose" event manually. There was a big thread "drawing
> graphics"
> (09.19.2001) about.

I have checked the example scribble_simple, which was mentioned in one of
the mails in the thread "drawing graphics". It works well on my PC. But it
doesn't call gdk_window_set_back_pixmap().

So I modified scribble_simple in order to use the pixmap as a back pixmap. I
called gdk_window_set_back_pixmap() in configure_event(), and I removed
gtk_signal_connect(..., "expose_event", ...) in main().

If I understood all explanations discussed in this mailing list right, I
would expect that the back pixmap refreshes the drawing area automatically
without having an expose_event handler implemented in the application. But
nothing happens when I click into the drawing area of scribble_simple.

But if I hide the scribble_simple window and reveal it again, it shows the
black rectangles drawn to the pixmap by draw_brush().

I'm not sure if it is relevant: I use X-Manager for remote login to the
Linux PC, and I have GTK+ 1.2 installed.

Any idea about that problem?

Joerg

_______________________________________________
gtk-list mailing list
gtk-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-list


*************************************************************************
Ce message et toutes les pieces jointes (ci-apres le "message") sont
confidentiels et etablis a l'intention exclusive de ses destinataires.
Toute utilisation ou diffusion non autorisee est interdite. 
Tout message electronique est susceptible d'alteration. 
SG Asset Management et ses filiales declinent toute responsabilite au titre
de ce message s'il a ete altere, deforme ou falsifie.

Découvrez l'offre et les services de SG Asset Management sur le site
www.sgam.fr 

				********

This message and any attachments (the "message") are confidential and
intended solely for the addressees.
Any unauthorised use or dissemination is prohibited. 
E-mails are susceptible to alteration.   
Neither SG Asset Management nor any of its subsidiaries or affiliates shall
be liable for the message if altered, changed or falsified. 

*************************************************************************






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]