Call Window()->Show() in DetachedFromWindow() only if we were dragging, thus correctly mirroring what done in AttachedToWindow(). This caused the empty menu window in deskbar (trac is down, can't remember the right bug number), but I don't know why it happened only in haiku. Maybe in beos the looper->Lock() call never succeeded, due to slightly different locking strategy ? Axel, could you review this change ?
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19589 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -212,13 +212,13 @@ TWindowMenu::DetachedFromWindow()
|
|||||||
// in expando mode the teammenu will not call DragStop,
|
// in expando mode the teammenu will not call DragStop,
|
||||||
// thus, it needs to be called from here
|
// thus, it needs to be called from here
|
||||||
TBarView *barview = (dynamic_cast<TBarApp*>(be_app))->BarView();
|
TBarView *barview = (dynamic_cast<TBarApp*>(be_app))->BarView();
|
||||||
if (barview && barview->Expando()) {
|
if (barview && barview->LockLooper()) {
|
||||||
BLooper *looper = barview->Looper();
|
if (barview->Expando() && barview->Dragging()) {
|
||||||
if (looper->Lock()) {
|
// We changed the show level in AttachedToWindow(). Undo it.
|
||||||
Window()->Show(); // We changed the show level in AttachedToWindow(). Undo it.
|
Window()->Show();
|
||||||
barview->DragStop();
|
barview->DragStop();
|
||||||
looper->Unlock();
|
|
||||||
}
|
}
|
||||||
|
barview->UnlockLooper();
|
||||||
}
|
}
|
||||||
|
|
||||||
BMenu::DetachedFromWindow();
|
BMenu::DetachedFromWindow();
|
||||||
|
|||||||
Reference in New Issue
Block a user