//Though, it seems to screw other things up. Maybe it IS better to pass it to all windows?
//Or maybe to just the ones that aren't completely obscured?
//Probably. Right now, a disk's close button that should be obscured by one sitting on
-//top of it gets redrawn. Not good.
+//top of it gets redrawn. Not good. !!! FIX !!!
for(i=windowList.begin(); i!=windowList.end(); i++)
(*i)->HandleMouseMove(mouse.x, mouse.y);
// windowList.back()->HandleMouseMove(mouse.x, mouse.y);
than one is clicked on, take the one highest in the Z order (closer to the end
of the list).
-- If item is highest in Z order, pack click through to window and exit.
+- If item is highest in Z order, pass click through to window and exit.
- Otherwise, restore backing store on each window in reverse order.
// iterator to a regular iterator requires backing the iterator
// up a position after grabbing it's base() OR going forward
// one position with the reverse iterator before grabbing base().
- // Ugly, but it get the job done...
+ // Ugly, but it gets the job done...
hit = (++ri).base();
// Put it back where we found it, so the tests following this
// don't fail...
//*misses* to everyone else... Otherwise, you can have overlapping draggable windows
//and be able to drag both by clicking on a point that intersects both...
//(though that may be an interesting way to handle things!)
+//The thing is that you want to do it on purpose (like with a special grouping widget)
+//instead of by accident. So, !!! FIX !!!
// Pass the click on to all windows
- for(i=windowList.begin(); i!=windowList.end(); i++)
- (*i)->HandleMouseButton(event.button.x, event.button.y, true);
+// for(i=windowList.begin(); i!=windowList.end(); i++)
+// (*i)->HandleMouseButton(event.button.x, event.button.y, true);
+ windowList.back()->HandleMouseButton(event.button.x, event.button.y, true);
// // & bail if nothing changed...
if (movedWindow)
//the Z order where the previous window was.
for(i=windowList.begin(); i!=windowList.end(); i++)
{
+//One other little quirk: Probably need to clear the backing store as well!
+//Not sure...
(*i)->ResetCoverageList();
// This looks odd, but it's just a consequence of iterator weirdness.