Skip to content

Conversation

@r3conx
Copy link

@r3conx r3conx commented Oct 9, 2025

This mod prevents resizing and blocks mouse input in a designated zone at the top of a non-maximized Chrome window, enhancing tab access.

This mod prevents resizing and blocks mouse input in a designated zone at the top of a non-maximized Chrome window, enhancing tab access.
Copy link
Member

@m417z m417z left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice idea!

// @version 1.0
// @author r3con
// @github https://github.com/r3conx
// @twitter https://twitter.com/x_r3con
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To verify your X (Twitter) account, please send me (https://twitter.com/m417z) a direct message with the following content:

I attest that I'm the sole owner of both this Twitter account (https://twitter.com/x_r3con) and the following GitHub account: https://github.com/r3conx

// If the result indicates the top resize handles...
if (result == HTTOP || result == HTTOPLEFT || result == HTTOPRIGHT) {
POINT cursor;
GetCursorPos(&cursor);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use lParam here just like for WM_MOUSEMOVE? Here and in the other places where GetCursorPos is called.

/*
- protectedZonePixels: 7
$name: Protected Top Zone (pixels)
$description: The height of the protected zone at the top of the window. Resizing and mouse input will be blocked in this zone when the window is positioned at the top of the screen. A full restart of Chrome is required for changes to this setting to take effect.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why restarting Chrome is required?

// ==WindhawkMod==
// @id chrome-top-resize-blocker
// @name Chrome Top Resize Blocker
// @description Prevents resizing and blocks the mouse cursor in a small zone at the top edge of a non-maximized Chrome window when it's positioned at the top of the screen. Useful for easily accessing browser tabs without accidentally resizing the window.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description is quite long, I suggest shortening it a bit to have it displayed as 3 rows in the Windhawk mod preview card. not 5 rows like it's now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants