Skip to content

Commit

Permalink
more 4631 - removed redundant window locks
Browse files Browse the repository at this point in the history
  • Loading branch information
alabuzhev committed Apr 28, 2016
1 parent ef5b9e7 commit 71cd9cc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 14 deletions.
6 changes: 5 additions & 1 deletion far/changelog
@@ -1,4 +1,8 @@
drkns 28.04.2016 16:52:55 +0200 - build 4645
drkns 28.04.2016 19:06:43 +0200 - build 4646

1. Продолжение 4631 - уберём ненужные блокировки окон.

drkns 28.04.2016 16:52:55 +0200 - build 4645

1. Уточнение 4644.

Expand Down
12 changes: 0 additions & 12 deletions far/macro.cpp
Expand Up @@ -676,13 +676,10 @@ int KeyMacro::ProcessEvent(const FAR_INPUT_RECORD *Rec)
int WaitInMainLoop0=Global->WaitInMainLoop;
m_InternalInput=1;
Global->WaitInMainLoop=FALSE;
// Залочить _текущее_ окно а не _последнее немодальное_
Global->WindowManager->GetCurrentWindow()->Lock(); // отменим прорисовку окна
DWORD MacroKey;
// выставляем флаги по умолчанию.
UINT64 Flags=0;
int AssignRet=AssignMacroKey(MacroKey,Flags);
Global->WindowManager->GetCurrentWindow()->Unlock(); // теперь можно :-)

if (AssignRet && AssignRet!=2 && !m_RecCode.empty())
{
Expand Down Expand Up @@ -1237,16 +1234,7 @@ int KeyMacro::GetMacroSettings(int Key,UINT64 &Flags,const wchar_t *Src,const wc
const auto Dlg = Dialog::create(MacroSettingsDlg, &KeyMacro::ParamMacroDlgProc, this, &Param);
Dlg->SetPosition(-1,-1,73,21);
Dlg->SetHelp(L"KeyMacroSetting");
const auto BottomWindow = Global->WindowManager->GetBottomWindow();
if(BottomWindow)
{
BottomWindow->Lock(); // отменим прорисовку окна
}
Dlg->Process();
if(BottomWindow)
{
BottomWindow->Unlock(); // теперь можно :-)
}

if (Dlg->GetExitCode()!=MS_BUTTON_OK)
return FALSE;
Expand Down
2 changes: 1 addition & 1 deletion far/vbuild.m4
@@ -1 +1 @@
m4_define(BUILD,4645)m4_dnl
m4_define(BUILD,4646)m4_dnl

0 comments on commit 71cd9cc

Please sign in to comment.