Re: pixmap/pixbuf confusion
- From: Owen Taylor <otaylor redhat com>
- To: Michael Koppelman <michael isis spa umn edu>
- Cc: "Peter \"Firefly\" Lund" <firefly diku dk>, gtk-app-devel-list gnome org
- Subject: Re: pixmap/pixbuf confusion
- Date: 13 Jul 2003 13:15:19 -0400
On Sun, 2003-07-13 at 13:08, Michael Koppelman wrote:
That it did seem to grab the current window was just one way a "random"
uninitialised buffer could turn out. Deal with it.
It didn't "seem" to grab the current window, it did grab the current
window 100 times out of 100. You only notice a problem if you change
the size of the pixmap to a size different from the window. From my
limited data (and without looking at the source) it seems to me that
the data is initialized with the current window. Otherwise it is a
miraculous (but not impossible) coincidence that with a thousand other
processes going it happened to use my window's old memory every time.
GTK+ draws by:
* Creating a pixmap
* Drawing to the pixmap
* Copying the pixmap to the window
Therefore, if you create a pixmap the size of a window, and you are
doing most of the drawing on the system, it's not all that surprising
that you end up with contents of the pixmap GTK+ used to draw the
window with last time.
I think you'd find in many other cases that the uninitialized memory
was something entirely different in most cases; you were just
getting lucky/unlucky.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]