Double clicking on the drag bar to maximize does not update the maximize button icon #2495

Closed
opened 2026-01-30 22:56:43 +00:00 by claunia · 8 comments
Owner

Originally created by @ocalvo on GitHub (Jul 2, 2019).

Originally assigned to: @DHowett-MSFT on GitHub.

Double clicking on the drag bar to maximize does not update the maximize button icon, the icon remains the same, by contrast, if you click the maximize button the icon does update.

Environment

Windows 10 19H1
Windows Terminal version (if applicable): master

Any other software?

Steps to reproduce

  1. Start Windows Terminal in normal state
  2. Double click the drag bar to maximize the window.

Expected behavior

The maximize button icon is updated

Actual behavior

The maximize button icon does not update.

We are not listening from window state change events from the top level window into the mixmaxclose user control.

Originally created by @ocalvo on GitHub (Jul 2, 2019). Originally assigned to: @DHowett-MSFT on GitHub. <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> Double clicking on the drag bar to maximize does not update the maximize button icon, the icon remains the same, by contrast, if you click the maximize button the icon does update. # Environment ```none Windows 10 19H1 Windows Terminal version (if applicable): master Any other software? ``` # Steps to reproduce 1. Start Windows Terminal in normal state 2. Double click the drag bar to maximize the window. <!-- A description of how to trigger this bug. --> # Expected behavior The maximize button icon is updated <!-- A description of what you're expecting, possibly containing screenshots or reference material. --> # Actual behavior The maximize button icon does not update. <!-- What's actually happening? --> We are not listening from window state change events from the top level window into the mixmaxclose user control.
Author
Owner

@gopalrander commented on GitHub (Jul 5, 2019):

Debugged and noticed that MinMaxCloseControl::DragBar_DoubleTapped() method is not hit when I double clicked the Drag bar. [But the window maximizes; strange?

@gopalrander commented on GitHub (Jul 5, 2019): Debugged and noticed that MinMaxCloseControl::DragBar_DoubleTapped() method is not hit when I double clicked the Drag bar. [But the window maximizes; strange?
Author
Owner

@DHowett-MSFT commented on GitHub (Jul 5, 2019):

@gopalrander the drag bar is actually cut out of the window using a region. It's a complicated story about why exactly we need to do this.

@DHowett-MSFT commented on GitHub (Jul 5, 2019): @gopalrander the drag bar is actually cut out of the window using a region. It's a complicated story about _why exactly_ we need to do this.
Author
Owner

@shanselman commented on GitHub (Sep 3, 2019):

Came here to make this bug. ;) Hitting it daily now. Can't we grab the event and delegate it over?

@shanselman commented on GitHub (Sep 3, 2019): Came here to make this bug. ;) Hitting it daily now. Can't we grab the event and delegate it over?
Author
Owner

@jj10133 commented on GitHub (Sep 12, 2019):

Hi Sir/Madam, I would like to ask you that do you also get an identifier error for both byte and HWND in TitlebarControl.h and TitlebarControl.cpp?? The whole section has lots of error. I just wanna confirm that are you also getting the same error?

Also when i debugged i noticed that DragBar_DoubledTapped method the event isn't detected where other detection of clicking the max,min or close the event is detected.

@jj10133 commented on GitHub (Sep 12, 2019): Hi Sir/Madam, I would like to ask you that do you also get an identifier error for both byte and HWND in TitlebarControl.h and TitlebarControl.cpp?? The whole section has lots of error. I just wanna confirm that are you also getting the same error? Also when i debugged i noticed that DragBar_DoubledTapped method the event isn't detected where other detection of clicking the max,min or close the event is detected.
Author
Owner

@filip-hejsek commented on GitHub (Sep 13, 2019):

Maximizing the window by dragging it to the top of the screen has the same problem

@filip-hejsek commented on GitHub (Sep 13, 2019): Maximizing the window by dragging it to the top of the screen has the same problem
Author
Owner

@zadjii-msft commented on GitHub (Sep 19, 2019):

If anyone's interested in fixing this, I think I broke this in #2438.

The trick is that I think we're now treating the titlebar area as HTCAPTION in NonClientIslandWindow, so the mouse presses aren't falling through to the underlying Xaml Island window (the one that draws the TitlebarControl).

We should be able to handle the double-click directly in NonClientIslandWindow directly. I'm a bit curious of why it regressed, but as long as a fix doesn't regress #2028, I'm happy.

@zadjii-msft commented on GitHub (Sep 19, 2019): If anyone's interested in fixing this, I think I broke this in #2438. The trick is that I think we're now treating the titlebar area as `HTCAPTION` in NonClientIslandWindow, so the mouse presses aren't falling through to the underlying Xaml Island window (the one that draws the TitlebarControl). We should be able to handle the double-click directly in NonClientIslandWindow directly. I'm a bit curious of _why_ it regressed, but as long as a fix doesn't regress #2028, I'm happy.
Author
Owner

@DHowett-MSFT commented on GitHub (Sep 19, 2019):

Nah, it never was hitting the island here. Double click on a Win32 titlebar always did a maximize by default :)

@DHowett-MSFT commented on GitHub (Sep 19, 2019): Nah, it never was hitting the island here. Double click on a Win32 titlebar always did a maximize by default :)
Author
Owner

@ghost commented on GitHub (Oct 4, 2019):

:tada:This issue was addressed in #3025, which has now been successfully released as Windows Terminal Preview v0.5.2762.0.🎉

Handy links:

@ghost commented on GitHub (Oct 4, 2019): :tada:This issue was addressed in #3025, which has now been successfully released as `Windows Terminal Preview v0.5.2762.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v0.5.2762.0) * [Store Download](https://www.microsoft.com/store/apps/9n0dx20hk701?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#2495