nanogui: Overlapping windows
Subject:
Re: [nanogui] Overlapping windows
From:
Alex Holden ####@####.####
Date:
13 Jan 2005 13:57:38 +0000
Message-Id: <41E67E36.3070309@linuxhacker.org>
Marco Bancale wrote:
> first... I sent few messages to this mailing list but I never got a
> reply. So please, even if you can't help me, reply to this message so
Yes, I think they're getting through OK but not many people on this list
answer questions any more (mainly just Greg).
I'll try to answer your question even though I retired from Microwindows
development quite a while ago now.
> If I have two windows (A, B) and A overlaps B partly and I use
> GrCopyArea() to copy the entire client area of B to A... I don't get
> the original content of B into A, but only the non-overlapped region
> of B! The rest is a copy of what I already have in A.
That's right, because you're copying from the screen to the screen, not
from an offscreen copy of the source window to the screen.
> I mean... can I copy the content of a window to another one if they
> overlap? What I understand is that Microwindows doesn't keep an
> offscreen buffer for every window, so when a window overlaps another
> one, the obscured region is kinda "lost" until the next Exposure
> event.
That's right, it's overwritten by the higher window.
> Is there a workaround for this?
If drawing into the lower window is particularly CPU intensive it might
be faster to create a pixmap which is the same size as the window and
draw to that instead of the window, then periodically copy the modified
parts of the pixmap to the screen and use it as the source for redrawing
the window when you get expose events on it.
--
------------ Alex Holden - http://www.alexholden.net/ ------------
If it doesn't work, you're not hitting it with a big enough hammer