* The Ctrl-Alt-window modifier patch was pretty broken. Also, I've disabled

window moving for windows without a decorator at all, at least that's what I
  would assume they intend (we might want to force them to set B_NOT_MOVABLE,
  too, though).
* This also fixes the crashing bug as described in ticket #4314.
+alphabranch


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32649 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2009-08-24 11:02:32 +00:00
parent 56c60d4bbc
commit 9a9aa3e021
+22 -19
View File
@@ -782,7 +782,7 @@ Window::MouseDown(BMessage* message, BPoint where, int32* _viewToken)
if (windowModifier || inBorderRegion) { if (windowModifier || inBorderRegion) {
// clicking Window visible area // clicking Window visible area
click_type action = DEC_DRAG; click_type action = DEC_NONE;
int32 buttons = _ExtractButtons(message); int32 buttons = _ExtractButtons(message);
if (inBorderRegion && fDecorator != NULL) if (inBorderRegion && fDecorator != NULL)
@@ -790,6 +790,8 @@ Window::MouseDown(BMessage* message, BPoint where, int32* _viewToken)
else { else {
if ((buttons & B_SECONDARY_MOUSE_BUTTON) != 0) if ((buttons & B_SECONDARY_MOUSE_BUTTON) != 0)
action = DEC_MOVETOBACK; action = DEC_MOVETOBACK;
else if ((fFlags & B_NOT_MOVABLE) == 0 && fDecorator != NULL)
action = DEC_DRAG;
} }
// ignore clicks on decorator buttons if the // ignore clicks on decorator buttons if the
@@ -837,28 +839,29 @@ Window::MouseDown(BMessage* message, BPoint where, int32* _viewToken)
break; break;
} }
// redraw decorator if (fDecorator != NULL) {
BRegion* visibleBorder = fRegionPool.GetRegion(); // redraw decorator
GetBorderRegion(visibleBorder); BRegion* visibleBorder = fRegionPool.GetRegion();
visibleBorder->IntersectWith(&VisibleRegion()); GetBorderRegion(visibleBorder);
visibleBorder->IntersectWith(&VisibleRegion());
DrawingEngine* engine = fDecorator->GetDrawingEngine(); DrawingEngine* engine = fDecorator->GetDrawingEngine();
engine->LockParallelAccess(); engine->LockParallelAccess();
engine->ConstrainClippingRegion(visibleBorder); engine->ConstrainClippingRegion(visibleBorder);
if (fIsZooming) { if (fIsZooming) {
fDecorator->SetZoom(true); fDecorator->SetZoom(true);
} else if (fIsClosing) { } else if (fIsClosing) {
fDecorator->SetClose(true); fDecorator->SetClose(true);
} else if (fIsMinimizing) { } else if (fIsMinimizing) {
fDecorator->SetMinimize(true); fDecorator->SetMinimize(true);
}
engine->UnlockParallelAccess();
fRegionPool.Recycle(visibleBorder);
} }
engine->UnlockParallelAccess();
fRegionPool.Recycle(visibleBorder);
// based on what the Decorator returned, properly place this window.
if (action == DEC_MOVETOBACK) { if (action == DEC_MOVETOBACK) {
fDesktop->SendWindowBehind(this); fDesktop->SendWindowBehind(this);
} else { } else {