https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7fafeb6390448aed9c435…
commit 7fafeb6390448aed9c435cf4baf2dd175fa2dc81
Author:     Carl J. Bialorucki <cbialo2(a)outlook.com>
AuthorDate: Tue Jul 4 07:16:24 2023 -0600
Commit:     GitHub <noreply(a)github.com>
CommitDate: Tue Jul 4 16:16:24 2023 +0300
    [EXPLORER] Save taskbar position and locked state after reboot (#5393)
    - Save locked state of the taskbar when toggled using its context menu.
    - Save position of the taskbar after dragging it around the desktop.
    - Invoke TRAYCMD_LOCK_TASKBAR command when (un)locking the taskbar
      by the context menu, instead of duplicating this functionality.
    CORE-11621 CORE-16997
---
 base/shell/explorer/traywnd.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/base/shell/explorer/traywnd.cpp b/base/shell/explorer/traywnd.cpp
index 05d130b4c3d..542c71c1dd5 100644
--- a/base/shell/explorer/traywnd.cpp
+++ b/base/shell/explorer/traywnd.cpp
@@ -843,10 +843,7 @@ public:
             break;
         case ID_LOCKTASKBAR:
-            if (SHRestricted(REST_CLASSICSHELL) == 0)
-            {
-                Lock(!g_TaskbarSettings.bLock);
-            }
+            HandleCommand(TRAYCMD_LOCK_TASKBAR);
             break;
         case ID_SHELL_CMD_OPEN_TASKMGR:
@@ -1016,6 +1013,7 @@ public:
                 if (SHRestricted(REST_CLASSICSHELL) == 0)
                 {
                     Lock(!g_TaskbarSettings.bLock);
+                    g_TaskbarSettings.Save();
                 }
                 break;
             case TRAYCMD_HELP_AND_SUPPORT:
@@ -1609,6 +1607,8 @@ GetPrimaryScreenRect:
             m_Monitor = m_DraggingMonitor;
             m_Position = m_DraggingPosition;
+            g_TaskbarSettings.sr.Position = m_Position;
+            g_TaskbarSettings.Save();
             IsDragging = FALSE;
             m_TrayRects[m_Position] = rcTray;