Re: Copying X pixmap.
- From: Owen Taylor <otaylor redhat com>
- To: Shannon Rause <gtk-list indpkgsup com>
- Cc: gtk-list gnome org
- Subject: Re: Copying X pixmap.
- Date: 03 May 2003 21:32:00 -0400
On Sat, 2003-05-03 at 19:42, Shannon Rause wrote:
> First, sorry if this gets posted twice *
> Can someone point me in the proper direction on how to do this...
> I have an X pixmap (Pixmap) and I would like to copy its contents onto a
> GdkWindow. I have tried to use XCopyArea() to do this but it appears that
> the background is redrawn over the copied pixmap. I set it up so the
> XCopyArea() occurs in the windows expose event. You can actually see the
> pixmap contents as it blinks when you resize the window but it is
> immediately replaced by the standard gray background color. Can someone
> tell me what I may be doing wrong?
GTK+ is double buffering. Within any ::expose handler all drawing is
redirected to a pixmap and at the end of the expose, it copies the
pixmap to the window. This means drawing directly to the window
doesn't work, because the pixmap will be copied over it.
For calls to GDK, the indirection is automatic, but GTK+ can't
redirect Xlib calls.
You can either:
a) disable double buffering for that widget with
b) Find out the identify of the double buffer pixmap using
> * I posted the original one from my work account and it was held by the admin because the email wasn't registered. I'm not sure if those ever get read/posted or not.
I do them every 2 or 3 days. I'll try to remember to reject this one.
http://mail.gnome.org/mailman/listinfo/post-only may be interesting;
any email subscribed to that address can post to any gnome.org mailing
list without moderation, but won't get any mail from the list.
] [Thread Prev