diff --git a/src/kits/tracker/DeskWindow.cpp b/src/kits/tracker/DeskWindow.cpp index 6a6ea7904d..54ccaa7a12 100644 --- a/src/kits/tracker/DeskWindow.cpp +++ b/src/kits/tracker/DeskWindow.cpp @@ -54,6 +54,7 @@ All rights reserved. #include "IconMenuItem.h" #include "MountMenu.h" #include "PoseView.h" +#include "SlowContextPopup.h" #include "Tracker.h" #include "TemplatesMenu.h" @@ -328,7 +329,7 @@ void BDeskWindow::AddTrashContextMenu() { // setup special trash context menu - fTrashContextMenu = new BPopUpMenu("TrashContext", false, false); + fTrashContextMenu = new BSlowContextMenu("TrashContext"); fTrashContextMenu->SetFont(be_plain_font); fTrashContextMenu->AddItem(new BMenuItem("Empty Trash", new BMessage(kEmptyTrash))); @@ -349,9 +350,8 @@ BDeskWindow::ShowContextMenu(BPoint loc, const entry_ref *ref, BView *view) DeleteSubmenu(fNavigationItem); if (ref && entry.SetTo(ref) == B_OK && FSIsTrashDir(&entry)) { - // - // don't show any menu if this is the trash - if (Dragging() && FSIsTrashDir(&entry)) + + if (fTrashContextMenu->IsShowing() || Dragging()) return; // selected item was trash, show the trash context menu instead diff --git a/src/kits/tracker/DeskWindow.h b/src/kits/tracker/DeskWindow.h index 9e95dee7e4..43ab1b5120 100644 --- a/src/kits/tracker/DeskWindow.h +++ b/src/kits/tracker/DeskWindow.h @@ -41,7 +41,7 @@ All rights reserved. #include "ContainerWindow.h" #include "DesktopPoseView.h" -class BPopUpMenu; +class BSlowContextMenu; namespace BPrivate { @@ -82,7 +82,7 @@ protected: private: BShelf *fDeskShelf; // shelf for replicant support - BPopUpMenu *fTrashContextMenu; + BSlowContextMenu *fTrashContextMenu; BRect fOldFrame;