@@ -83,8 +83,11 @@ enum JIS_VKS {
83
83
bool toolbarUpdaterRunning ;
84
84
bool enableToolbarUpdate ;
85
85
int guiLock ;
86
+
87
+ public bool IsGuiLocked => guiLock > 0 ;
88
+
86
89
int lastX , lastY ;
87
-
90
+
88
91
// Fields used to keep track of the application focus
89
92
bool appHasFocus ;
90
93
Window lastFocused ;
@@ -932,7 +935,7 @@ public bool UnlockAll ()
932
935
toolbar . SetEnabled ( true ) ;
933
936
}
934
937
935
- if ( guiLock > 0 )
938
+ if ( IsGuiLocked )
936
939
guiLock -- ;
937
940
return guiLock == 0 ;
938
941
}
@@ -1591,7 +1594,7 @@ internal bool DispatchCommand (object commandId, object dataItem, object initial
1591
1594
1592
1595
RegisterUserInteraction ( ) ;
1593
1596
1594
- if ( guiLock > 0 )
1597
+ if ( IsGuiLocked )
1595
1598
return false ;
1596
1599
1597
1600
#if MAC
@@ -1841,7 +1844,7 @@ public CommandInfo GetCommandInfo (object commandId, CommandTargetRoute targetRo
1841
1844
if ( IsEnabled )
1842
1845
cui . Run ( cmdTarget , info . ArrayInfo ) ;
1843
1846
if ( ! info . ArrayInfo . Bypass ) {
1844
- if ( info . DisableOnShellLock && guiLock > 0 )
1847
+ if ( info . DisableOnShellLock && IsGuiLocked )
1845
1848
info . Enabled = false ;
1846
1849
handlerFound = true ;
1847
1850
}
@@ -1851,7 +1854,7 @@ public CommandInfo GetCommandInfo (object commandId, CommandTargetRoute targetRo
1851
1854
if ( IsEnabled )
1852
1855
cui . Run ( cmdTarget , info ) ;
1853
1856
if ( ! info . Bypass ) {
1854
- if ( info . DisableOnShellLock && guiLock > 0 )
1857
+ if ( info . DisableOnShellLock && IsGuiLocked )
1855
1858
info . Enabled = false ;
1856
1859
handlerFound = true ;
1857
1860
}
@@ -1903,7 +1906,7 @@ public CommandInfo GetCommandInfo (object commandId, CommandTargetRoute targetRo
1903
1906
CurrentCommand = null ;
1904
1907
}
1905
1908
1906
- if ( info . DisableOnShellLock && guiLock > 0 )
1909
+ if ( info . DisableOnShellLock && IsGuiLocked )
1907
1910
info . Enabled = false ;
1908
1911
return info ;
1909
1912
}
0 commit comments