Added comments which clarify why we are doing things like this.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23277 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini
2008-01-07 13:43:29 +00:00
parent 0cd362c755
commit d19c9634d4
+4 -5
View File
@@ -384,7 +384,9 @@ BMenuBar::StartMenuBar(int32 menuIndex, bool sticky, bool showMenu, BRect *speci
fPrevFocusToken = -1;
fTracking = true;
// We are called from the window's thread,
// so let's call MenusBeginning() directly
window->MenusBeginning();
fMenuSem = create_sem(0, "window close sem");
@@ -431,10 +433,7 @@ BMenuBar::_TrackTask(void *arg)
menuBar->fTracking = false;
menuBar->fExtraRect = NULL;
// Sends a _MENUS_DONE_ message to the BWindow.
// Weird: There is a _MENUS_DONE_ message but not a
// _MENUS_BEGINNING_ message, in fact the MenusBeginning()
// hook function is called directly.
// We aren't the BWindow thread, so don't call MenusEnded() directly
BWindow *window = menuBar->Window();
window->PostMessage(_MENUS_DONE_);