Fixed vlc menubars
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16975 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -961,7 +961,7 @@ BMenu::Track(bool openAnyway, BRect *clickToOpenRect)
|
|||||||
|
|
||||||
SetStickyMode(openAnyway);
|
SetStickyMode(openAnyway);
|
||||||
|
|
||||||
if (LockLooper()) {
|
if (openAnyway && LockLooper()) {
|
||||||
RedrawAfterSticky(Bounds());
|
RedrawAfterSticky(Bounds());
|
||||||
UnlockLooper();
|
UnlockLooper();
|
||||||
}
|
}
|
||||||
@@ -1242,11 +1242,11 @@ BMenu::_AddItem(BMenuItem *item, int32 index)
|
|||||||
item->Install(window);
|
item->Install(window);
|
||||||
|
|
||||||
// Make sure we update the layout if needed.
|
// Make sure we update the layout if needed.
|
||||||
if (fResizeToFit) {
|
//if (fResizeToFit) {
|
||||||
LayoutItems(index);
|
LayoutItems(index);
|
||||||
//UpdateWindowViewSize();
|
//UpdateWindowViewSize();
|
||||||
Invalidate();
|
Invalidate();
|
||||||
}
|
//}
|
||||||
window->Unlock();
|
window->Unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1303,7 +1303,7 @@ BMenu::RemoveItems(int32 index, int32 count, BMenuItem *item, bool deleteItems)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (invalidateLayout && locked && fResizeToFit) {
|
if (invalidateLayout && locked /*&& fResizeToFit*/) {
|
||||||
LayoutItems(0);
|
LayoutItems(0);
|
||||||
Invalidate();
|
Invalidate();
|
||||||
}
|
}
|
||||||
@@ -1321,7 +1321,7 @@ BMenu::LayoutItems(int32 index)
|
|||||||
CalcTriggers();
|
CalcTriggers();
|
||||||
|
|
||||||
float width, height;
|
float width, height;
|
||||||
ComputeLayout(index, true, true, &width, &height);
|
ComputeLayout(index, fResizeToFit, true, &width, &height);
|
||||||
|
|
||||||
ResizeTo(width, height);
|
ResizeTo(width, height);
|
||||||
|
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ BMenuBar::BMenuBar(BMessage *data)
|
|||||||
|
|
||||||
BMenuBar::~BMenuBar()
|
BMenuBar::~BMenuBar()
|
||||||
{
|
{
|
||||||
if (fTrackingPID >= 0) {
|
if (fTracking) {
|
||||||
status_t dummy;
|
status_t dummy;
|
||||||
wait_for_thread(fTrackingPID, &dummy);
|
wait_for_thread(fTrackingPID, &dummy);
|
||||||
}
|
}
|
||||||
@@ -174,6 +174,9 @@ BMenuBar::MessageReceived(BMessage *msg)
|
|||||||
void
|
void
|
||||||
BMenuBar::MouseDown(BPoint where)
|
BMenuBar::MouseDown(BPoint where)
|
||||||
{
|
{
|
||||||
|
if (fTracking)
|
||||||
|
return;
|
||||||
|
|
||||||
BWindow *window = Window();
|
BWindow *window = Window();
|
||||||
if (!window->IsActive() || !window->IsFront()) {
|
if (!window->IsActive() || !window->IsFront()) {
|
||||||
window->Activate();
|
window->Activate();
|
||||||
|
|||||||
Reference in New Issue
Block a user