synced to 1.17 from OpenTracker CVS (fixed a deadlock when dragging something over Deskbar)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17497 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -400,15 +400,16 @@ TExpandoMenuBar::MouseMoved(BPoint where, uint32 code, const BMessage *message)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
BPoint loc;
|
|
||||||
uint32 buttons;
|
uint32 buttons;
|
||||||
GetMouse(&loc, &buttons);
|
if (!(Window()->CurrentMessage())
|
||||||
|
|| Window()->CurrentMessage()->FindInt32("buttons", (int32*)&buttons) < B_OK)
|
||||||
|
buttons = 0;
|
||||||
|
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case B_ENTERED_VIEW:
|
case B_ENTERED_VIEW:
|
||||||
if (message && buttons != 0) {
|
if (message && buttons != 0) {
|
||||||
fBarView->CacheDragData((BMessage *)message);
|
fBarView->CacheDragData(message);
|
||||||
MouseDown(loc);
|
MouseDown(where);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -417,9 +418,9 @@ TExpandoMenuBar::MouseMoved(BPoint where, uint32 code, const BMessage *message)
|
|||||||
if (!TeamItemAtPoint(where)
|
if (!TeamItemAtPoint(where)
|
||||||
&& !InBeMenu(where)
|
&& !InBeMenu(where)
|
||||||
&& (fSeparatorItem && !fSeparatorItem->Frame().Contains(where))
|
&& (fSeparatorItem && !fSeparatorItem->Frame().Contains(where))
|
||||||
&& !Frame().Contains(where))
|
&& !Frame().Contains(where)) {
|
||||||
fBarView->DragStop();
|
fBarView->DragStop();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -436,9 +437,14 @@ TExpandoMenuBar::InBeMenu(BPoint loc) const
|
|||||||
} else {
|
} else {
|
||||||
TBarWindow *window = dynamic_cast<TBarWindow*>(Window());
|
TBarWindow *window = dynamic_cast<TBarWindow*>(Window());
|
||||||
if (window) {
|
if (window) {
|
||||||
TBeMenu *bemenu = window->BeMenu();
|
if (TBeMenu *bemenu = window->BeMenu()) {
|
||||||
if (bemenu && bemenu->Frame().Contains(loc))
|
bool inBeMenu = false;
|
||||||
return true;
|
if (bemenu->LockLooper()) {
|
||||||
|
inBeMenu = bemenu->Frame().Contains(loc);
|
||||||
|
bemenu->UnlockLooper();
|
||||||
|
}
|
||||||
|
return inBeMenu;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user