https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f8c28b977363444ad3112…
commit f8c28b977363444ad31124a6794347c53532b43f
Author: Kyle Katarn <112266950+KRosUser(a)users.noreply.github.com>
AuthorDate: Sat Sep 3 17:27:50 2022 +0200
Commit: GitHub <noreply(a)github.com>
CommitDate: Sat Sep 3 17:27:50 2022 +0200
[TASKMGR] Fix UI on SwitchTo for multiple application (#4652)
---
base/applications/taskmgr/applpage.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/base/applications/taskmgr/applpage.c b/base/applications/taskmgr/applpage.c
index b249006e94b..e21de9922cf 100644
--- a/base/applications/taskmgr/applpage.c
+++ b/base/applications/taskmgr/applpage.c
@@ -512,15 +512,8 @@ void ApplicationPageUpdate(void)
{
EnableWindow(hApplicationPageEndTaskButton, FALSE);
}
- /* Enable "Switch To" button only if one app is selected */
- if (ListView_GetSelectedCount(hApplicationPageListCtrl) == 1 )
- {
- EnableWindow(hApplicationPageSwitchToButton, TRUE);
- }
- else
- {
- EnableWindow(hApplicationPageSwitchToButton, FALSE);
- }
+ /* Enable "Switch To" button only if only one app is selected */
+ EnableWindow(hApplicationPageSwitchToButton,
(ListView_GetSelectedCount(hApplicationPageListCtrl) == 1));
/* If we are on the applications tab the windows menu will be */
/* present on the menu bar so enable & disable the menu items */
@@ -693,6 +686,7 @@ void ApplicationPageShowContextMenu2(void)
if (ListView_GetSelectedCount(hApplicationPageListCtrl) == 1)
{
+ EnableMenuItem(hSubMenu, ID_APPLICATION_PAGE_SWITCHTO, MF_BYCOMMAND|MF_ENABLED);
EnableMenuItem(hSubMenu, ID_WINDOWS_TILEHORIZONTALLY,
MF_BYCOMMAND|MF_DISABLED|MF_GRAYED);
EnableMenuItem(hSubMenu, ID_WINDOWS_TILEVERTICALLY,
MF_BYCOMMAND|MF_DISABLED|MF_GRAYED);
EnableMenuItem(hSubMenu, ID_WINDOWS_MINIMIZE, MF_BYCOMMAND|MF_ENABLED);
@@ -702,6 +696,7 @@ void ApplicationPageShowContextMenu2(void)
}
else if (ListView_GetSelectedCount(hApplicationPageListCtrl) > 1)
{
+ EnableMenuItem(hSubMenu, ID_APPLICATION_PAGE_SWITCHTO,
MF_BYCOMMAND|MF_DISABLED|MF_GRAYED);
EnableMenuItem(hSubMenu, ID_WINDOWS_TILEHORIZONTALLY, MF_BYCOMMAND|MF_ENABLED);
EnableMenuItem(hSubMenu, ID_WINDOWS_TILEVERTICALLY, MF_BYCOMMAND|MF_ENABLED);
EnableMenuItem(hSubMenu, ID_WINDOWS_MINIMIZE, MF_BYCOMMAND|MF_ENABLED);
@@ -711,6 +706,7 @@ void ApplicationPageShowContextMenu2(void)
}
else
{
+ EnableMenuItem(hSubMenu, ID_APPLICATION_PAGE_SWITCHTO,
MF_BYCOMMAND|MF_DISABLED|MF_GRAYED);
EnableMenuItem(hSubMenu, ID_WINDOWS_TILEHORIZONTALLY,
MF_BYCOMMAND|MF_DISABLED|MF_GRAYED);
EnableMenuItem(hSubMenu, ID_WINDOWS_TILEVERTICALLY,
MF_BYCOMMAND|MF_DISABLED|MF_GRAYED);
EnableMenuItem(hSubMenu, ID_WINDOWS_MINIMIZE,
MF_BYCOMMAND|MF_DISABLED|MF_GRAYED);