@@ -77,7 +77,7 @@ func (a *App) activateHintMode(action Action) {
7777 // Always resize overlay to the active screen (where mouse is) before collecting elements
7878 // This ensures proper positioning when switching between multiple displays
7979 if a .hintOverlay != nil {
80- // Use synchronous resize with callback - no artificial delay needed
80+ // Use synchronous resize with timeout to prevent hanging
8181 a .hintOverlay .ResizeToActiveScreenSync ()
8282 a .hintOverlayNeedsRefresh = false
8383 }
@@ -172,7 +172,7 @@ func (a *App) activateGridMode(action Action) {
172172 if a .gridCtx != nil && a .gridCtx .gridOverlay != nil {
173173 gridOverlay := * a .gridCtx .gridOverlay
174174
175- // Use synchronous resize with callback - no artificial delay needed
175+ // Use synchronous resize with timeout to prevent hanging
176176 gridOverlay .ResizeToActiveScreenSync ()
177177 a .gridOverlayNeedsRefresh = false
178178 }
@@ -925,7 +925,7 @@ func (a *App) exitMode() {
925925 a .hintOverlay .Hide ()
926926 case ModeGrid :
927927 // If we are in mouse up action, remove the mouse up to prevent further dragging
928- if a .currentAction == ActionMouseUp {
928+ if a .gridCtx . currentAction == ActionMouseUp {
929929 a .logger .Info ("Detected MouseUp action, removing mouse up event..." )
930930 err := accessibility .LeftMouseUp ()
931931 if err != nil {
@@ -943,6 +943,7 @@ func (a *App) exitMode() {
943943 }
944944 // Hide overlays
945945 if a .gridCtx != nil && a .gridCtx .gridOverlay != nil && * a .gridCtx .gridOverlay != nil {
946+ a .logger .Info ("Hiding grid overlay" )
946947 (* a .gridCtx .gridOverlay ).Hide ()
947948 }
948949 // Also clear any context menu drawn on hint overlay
@@ -959,6 +960,7 @@ func (a *App) exitMode() {
959960 // Update mode after all cleanup is done
960961 a .currentMode = ModeIdle
961962 a .currentAction = ActionLeftClick
963+ a .gridCtx .currentAction = ActionLeftClick
962964 a .logger .Debug ("Mode transition complete" ,
963965 zap .String ("to" , "idle" ))
964966
0 commit comments