-
-
Notifications
You must be signed in to change notification settings - Fork 747
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Double-click sometimes incorrectly maximizes the application #43
Comments
@Aelarion #36 (comment) related |
I'm having trouble reproducing this, but just looking through the code I think the wpfui/WPFUI/Controls/TitleBar.cs Lines 504 to 510 in a0795c3
Both of these handlers are looking for the mouse to be pressed, however the Since the Looking at the Change: if (e.LeftButton != MouseButtonState.Pressed || ParentWindow == null) return;
if (IsMaximized)
{
...
ParentWindow.DragMove();
} To: if (e.LeftButton != MouseButtonState.Pressed || ParentWindow == null) return;
if (IsMaximized)
{
...
}
ParentWindow.DragMove(); Edit: logic clarification |
@pomianowski disregard my previous comment -- it's so much simpler... To reproduce this issue, place the window towards the top of your screen, so that the TitleBar will be under your mouse when you double click it. Somewhere in here, this is triggering the EDIT: After doing some inspection on the mouse position, it looks like this is firing because the mouse coordinates with respect to the control are changing when the window is resized (e.g. the width is increased when maximized and the window location is moved, so the mouse X coordinate changes on the grid -- therefore the I'll work on this one, should be fairly straightforward to correct. |
Fix double-click maximize issue referenced by #43
Describe the bug
Sometimes when you trigger the maximizing by double-clicking on the TitleBar, the application is immediately maximized and restored.
To Reproduce
Expected behavior
Double click always maximizes the application from its normal state.
Screenshots
Desktop:
Additional context
#36
/ Multimonitor setup - 3440x1440 (125%) [Landscape] + 1080x1920 (125%) [Portrait]
The text was updated successfully, but these errors were encountered: