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;
        }
Ejemplo n.º 2
0
 public void HookupTriggers()
 {
     WindowHooks.WinEventDelegate windowMovedDelegate = new(WindowMovedMethod);
     _gcSafetyHandle = GCHandle.Alloc(windowMovedDelegate);
     _hook           = WindowHooks.WinEventHookOne(NativeMethods.SWEH_Events.EVENT_SYSTEM_MOVESIZEEND, windowMovedDelegate, 0, 0);
 }