nanogui: Can non-rectangular overlapping windows work?
Subject:
Can non-rectangular overlapping windows work?
From:
tj ####@####.####
Date:
8 May 2004 17:01:44 +0100
Message-Id: <409D044F.3090301@comcast.net>
As I was writing out the problem, a fix occurred to me. While I feel the
fix, at bottom of email, is a band-aid, it will work for now.
The problem:
For the past two days I have been trying to get a very simple app
working that consists of two windows. Each window is non-rectangular and
fit together on one edge like two jigsaw puzzle pieces. This is done
using bitmaps for the windows and having a coresponding mask for each.
The problem is that I have a catch-22 like scenario. If I get the app
where the mouse correctly returns the id for the window whose area it is
in, even in the overlapped area of the two, then the background of the
window that was first mapped, the bottom one in the overlapped area, is
drawn, not the GrDrawImageTo Fit(), ie the foreground.
But, if I use combinations of combining regions and intersect and get
it to where both windows display their foregrounds, then the mouse
doesn't work. A click in the overlapping area returns the id of the last
mapped window, ie the one on top, even if it is the bottom windws
displayed area.
Like I said a catch-22.
My Band-aid:
As I finished writing the above problem a quick "fix" occurred to me.
Since when the mouse worked in the overlayed area the bottom window's
background, but not the foreground, was displayed I used the image to
create a pixmap and used GrSetBackgroundPixmap(). Now the original
bitmap is the background and is displayed.
But, that also means that any graphical or test modifications have to be
written to an off screen image and then that image set as the
background. Kinda clugy.
So, still my question is can you have the area of overlap of two
non-rectangular windows display the foreground of each window while the
mouse returns the correct id for the window area it is in?
I do not want to even think about an area of overlap of THREE windows :-).
tj