Skip to content
This repository was archived by the owner on Oct 4, 2021. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,11 @@ enum JIS_VKS {
bool toolbarUpdaterRunning;
bool enableToolbarUpdate;
int guiLock;

public bool IsLocked => guiLock > 0;

int lastX, lastY;

// Fields used to keep track of the application focus
bool appHasFocus;
Window lastFocused;
Expand Down Expand Up @@ -932,7 +935,7 @@ public bool UnlockAll ()
toolbar.SetEnabled (true);
}

if (guiLock > 0)
if (IsLocked)
guiLock--;
return guiLock == 0;
}
Expand Down Expand Up @@ -1591,7 +1594,7 @@ internal bool DispatchCommand (object commandId, object dataItem, object initial

RegisterUserInteraction ();

if (guiLock > 0)
if (IsLocked)
return false;

#if MAC
Expand Down Expand Up @@ -1841,7 +1844,7 @@ public CommandInfo GetCommandInfo (object commandId, CommandTargetRoute targetRo
if (IsEnabled)
cui.Run (cmdTarget, info.ArrayInfo);
if (!info.ArrayInfo.Bypass) {
if (info.DisableOnShellLock && guiLock > 0)
if (info.DisableOnShellLock && IsLocked)
info.Enabled = false;
handlerFound = true;
}
Expand All @@ -1851,7 +1854,7 @@ public CommandInfo GetCommandInfo (object commandId, CommandTargetRoute targetRo
if (IsEnabled)
cui.Run (cmdTarget, info);
if (!info.Bypass) {
if (info.DisableOnShellLock && guiLock > 0)
if (info.DisableOnShellLock && IsLocked)
info.Enabled = false;
handlerFound = true;
}
Expand Down Expand Up @@ -1903,7 +1906,7 @@ public CommandInfo GetCommandInfo (object commandId, CommandTargetRoute targetRo
CurrentCommand = null;
}

if (info.DisableOnShellLock && guiLock > 0)
if (info.DisableOnShellLock && IsLocked)
info.Enabled = false;
return info;
}
Expand Down