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:
Stefano Ceccherini 2006-12-21 14:32:22 +00:00
parent d2de13bdd4
commit 9f0ebbfcda

View File

@ -212,13 +212,13 @@ TWindowMenu::DetachedFromWindow()
// in expando mode the teammenu will not call DragStop,
// thus, it needs to be called from here
TBarView *barview = (dynamic_cast<TBarApp*>(be_app))->BarView();
if (barview && barview->Expando()) {
BLooper *looper = barview->Looper();
if (looper->Lock()) {
Window()->Show(); // We changed the show level in AttachedToWindow(). Undo it.
barview->DragStop();
looper->Unlock();
if (barview && barview->LockLooper()) {
if (barview->Expando() && barview->Dragging()) {
// We changed the show level in AttachedToWindow(). Undo it.
Window()->Show();
barview->DragStop();
}
barview->UnlockLooper();
}
BMenu::DetachedFromWindow();