Skip to content

Commit

Permalink
Add a hidden option to control whether mouse hook is enabled or disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
sdottaka committed Jan 25, 2025
1 parent 8711b80 commit bc3759b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Src/Merge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,8 @@ BOOL CMergeApp::InitInstance()
return FALSE;
}

CMouseHook::SetMouseHook();
if (GetOptionsMgr()->GetBool(OPT_MOUSE_HOOK_ENABLED))
CMouseHook::SetMouseHook();

// create main MDI Frame window
CMainFrame* pMainFrame = new CMainFrame;
Expand Down
3 changes: 3 additions & 0 deletions Src/OptionsDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,9 @@ inline const String OPT_TABBAR_AUTO_MAXWIDTH {_T("Settings/TabBarAutoMaxWidth"s)
// MRU
inline const String OPT_MRU_MAX {_T("Settings/MRUMax"s)};

// Experimentals
inline const String OPT_MOUSE_HOOK_ENABLED {_T("Settings/MouseHookEnabled"s)};

// Font options
inline const String OPT_FONT_FILECMP {_T("Font/"s)};
inline const String OPT_FONT_DIRCMP {_T("FontDirCompare/"s)};
Expand Down
2 changes: 2 additions & 0 deletions Src/OptionsInit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,8 @@ void Init(COptionsMgr *pOptions)
pOptions->InitOption(OPT_SYSCOLOR_HOOK_ENABLED, false);
pOptions->InitOption(OPT_SYSCOLOR_HOOK_COLORS, _T(""));

pOptions->InitOption(OPT_MOUSE_HOOK_ENABLED, true);

Options::CustomColors::Init(pOptions);
Options::DiffOptions::Init(pOptions);
Options::DiffColors::Init(pOptions);
Expand Down

0 comments on commit bc3759b

Please sign in to comment.