mirror of
https://github.com/Open-Shell/Open-Shell-Menu.git
synced 2026-06-15 03:46:37 +10:00
Don't close menu(s) on certain operations
In several cases we don't want menu(s) to close when an action on menu was done. For example on drag-n-drop or menu item deletion (where confirmation dialog is shown). In such situations `s_bPreventClosing` was set to true (and then back to false when closing was allowed again). Though original code honored this variable only in certain situations and typically (at least on Win10) menus were hidden/closed despite of it. This patch changes the behavior and menus(s) are not closed when `s_bPreventClosing` is set to true. Basically now menu(s) stay visible until there is an action that changes active window. Following functionality was also removed because it is not needed now: * CMenuContainer::HideTemp * COwnerWindow::OnClear WM_CLEAR was sent to the window only by already removed `HideTemp`
This commit is contained in:
@@ -957,7 +957,6 @@ private:
|
||||
friend LRESULT CALLBACK SubclassTopMenuProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT_PTR uIdSubclass, DWORD_PTR dwRefData );
|
||||
friend HRESULT CreatePinLink( PCIDLIST_ABSOLUTE sourcePidl, const wchar_t *name, const wchar_t *iconPath, int iconIndex );
|
||||
|
||||
static void HideTemp( bool bHide );
|
||||
static void AddMRUShortcut( const wchar_t *path );
|
||||
static void AddMRUAppId( const wchar_t *appid );
|
||||
static void DeleteMRUShortcut( const wchar_t *path );
|
||||
|
||||
Reference in New Issue
Block a user