public void HookupTriggers()
        {
            afterLayout.SetOutput(AllWindowsLayout.GetCurrentLayout());

            WindowHooks.WinEventDelegate windowMovedDelegate = new(WindowMoved);
            _gcSafetyHandle = GCHandle.Alloc(windowMovedDelegate);
            _hook           = WindowHooks.WinEventHookOne(NativeMethods.SWEH_Events.EVENT_SYSTEM_MOVESIZEEND, windowMovedDelegate, 0, 0);
            _hook2          = WindowHooks.WinEventHookOne(NativeMethods.SWEH_Events.EVENT_OBJECT_FOCUS, windowMovedDelegate, 0, 0);
            WindowHooks.WindowArrangementManuallyChanged += ArrangementChanged;
        }
 private void ArrangementChanged()
 {
     beforeLayout.SetOutput(afterLayout.GetOutput());
     afterLayout.SetOutput(AllWindowsLayout.GetCurrentLayout());
 }