Skip to content

Commit

Permalink
fix: right-click close after the wheel switches tabs cannot be trigge…
Browse files Browse the repository at this point in the history
…red. #21
  • Loading branch information
Bush2021 committed Dec 3, 2023
1 parent 3de70e4 commit d9889a1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/TabBookmark.h
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ NodePtr GetTopContainerView(HWND hwnd)
{
NodePtr TopContainerView = nullptr;
wchar_t name[MAX_PATH];
if (GetClassName(hwnd, name, MAX_PATH) && wcscmp(name, L"Chrome_WidgetWin_1") == 0)
if (GetClassName(hwnd, name, MAX_PATH) && wcsstr(name, L"Chrome_WidgetWin_") == name)
{
NodePtr paccMainWindow = nullptr;
if (S_OK == AccessibleObjectFromWindow(hwnd, OBJID_WINDOW, IID_PPV_ARGS(&paccMainWindow)))
Expand Down Expand Up @@ -384,7 +384,7 @@ NodePtr GetMenuBarPane(HWND hwnd)
{
NodePtr MenuBarPane = nullptr;
wchar_t name[MAX_PATH];
if (GetClassName(hwnd, name, MAX_PATH) && wcscmp(name, L"Chrome_WidgetWin_1") == 0)
if (GetClassName(hwnd, name, MAX_PATH) && wcsstr(name, L"Chrome_WidgetWin_") == name)
{
NodePtr paccMainWindow = nullptr;
if (S_OK == AccessibleObjectFromWindow(hwnd, OBJID_WINDOW, IID_PPV_ARGS(&paccMainWindow)))
Expand Down Expand Up @@ -818,7 +818,7 @@ LRESULT CALLBACK MouseProc(int nCode, WPARAM wParam, LPARAM lParam)
ExecuteCommand(IDC_SELECT_NEXT_TAB, hwnd);
}

wheel_tab_ing = true;
// wheel_tab_ing = true;
if (TopContainerView)
{
}
Expand Down Expand Up @@ -934,7 +934,7 @@ LRESULT CALLBACK MouseProc(int nCode, WPARAM wParam, LPARAM lParam)
}
}

if (IsBookmarkNewTab && wParam == WM_LBUTTONUP && !IsPressed(VK_MBUTTON))
if (IsBookmarkNewTab && wParam == WM_LBUTTONUP && !IsPressed(VK_CONTROL) && !IsPressed(VK_SHIFT))
{
HWND hwnd = WindowFromPoint(pmouse->pt);
NodePtr BrowserView = GetBrowserView(hwnd);
Expand Down

0 comments on commit d9889a1

Please sign in to comment.