Skip to content

Commit

Permalink
chore: remove useless parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
Bush2021 committed Apr 11, 2024
1 parent d96ffd0 commit 6173a25
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/tabbookmark.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ bool handleMouseWheel(WPARAM wParam, LPARAM lParam, PMOUSEHOOKSTRUCT pmouse) {
}

// 双击关闭标签页
bool handleDblClk(WPARAM wParam, LPARAM lParam, PMOUSEHOOKSTRUCT pmouse) {
bool handleDblClk(WPARAM wParam, PMOUSEHOOKSTRUCT pmouse) {
if (wParam != WM_LBUTTONDBLCLK || !config.is_double_click_close) {
return false;
}
Expand All @@ -125,7 +125,7 @@ bool handleDblClk(WPARAM wParam, LPARAM lParam, PMOUSEHOOKSTRUCT pmouse) {
}

// 右键关闭标签页
bool handleRightClick(WPARAM wParam, LPARAM lParam, PMOUSEHOOKSTRUCT pmouse) {
bool handleRightClick(WPARAM wParam, PMOUSEHOOKSTRUCT pmouse) {
if (wParam != WM_RBUTTONUP || IsPressed(VK_SHIFT) ||
!config.is_right_click_close) {
return false;
Expand All @@ -151,7 +151,7 @@ bool handleRightClick(WPARAM wParam, LPARAM lParam, PMOUSEHOOKSTRUCT pmouse) {
}

// 保留最后标签页 - 中键
bool handleMiddleClick(WPARAM wParam, LPARAM lParam, PMOUSEHOOKSTRUCT pmouse) {
bool handleMiddleClick(WPARAM wParam, PMOUSEHOOKSTRUCT pmouse) {
if (wParam != WM_MBUTTONUP) {
return false;
}
Expand All @@ -171,7 +171,7 @@ bool handleMiddleClick(WPARAM wParam, LPARAM lParam, PMOUSEHOOKSTRUCT pmouse) {
}

// 新标签页打开书签
bool handleBookmark(WPARAM wParam, LPARAM lParam, PMOUSEHOOKSTRUCT pmouse) {
bool handleBookmark(WPARAM wParam, PMOUSEHOOKSTRUCT pmouse) {
if (wParam != WM_LBUTTONUP || IsPressed(VK_CONTROL) || IsPressed(VK_SHIFT) ||
config.is_bookmark_new_tab == "disabled") {
return false;
Expand All @@ -196,7 +196,7 @@ bool handleBookmark(WPARAM wParam, LPARAM lParam, PMOUSEHOOKSTRUCT pmouse) {
}

// 新标签页打开书签文件夹中的书签
bool handleBookmarkMenu(WPARAM wParam, LPARAM lParam, PMOUSEHOOKSTRUCT pmouse) {
bool handleBookmarkMenu(WPARAM wParam, PMOUSEHOOKSTRUCT pmouse) {
if (wParam != WM_LBUTTONUP || IsPressed(VK_CONTROL) || IsPressed(VK_SHIFT) ||
config.is_bookmark_new_tab == "disabled") {
return false;
Expand Down Expand Up @@ -266,21 +266,21 @@ LRESULT CALLBACK MouseProc(int nCode, WPARAM wParam, LPARAM lParam) {
return 1;
}

if (handleDblClk(wParam, lParam, pmouse)) {}
if (handleDblClk(wParam, pmouse)) {}

if (handleRightClick(wParam, lParam, pmouse)) {
if (handleRightClick(wParam, pmouse)) {
return 1;
}

if (handleMiddleClick(wParam, lParam, pmouse)) {
if (handleMiddleClick(wParam, pmouse)) {
// return 1;
}

if (handleBookmark(wParam, lParam, pmouse)) {
if (handleBookmark(wParam, pmouse)) {
return 1;
}

if (handleBookmarkMenu(wParam, lParam, pmouse)) {
if (handleBookmarkMenu(wParam, pmouse)) {
return 1;
}
}
Expand Down

0 comments on commit 6173a25

Please sign in to comment.