Windows 11's Snap Layouts feature generates a window of layout options when the maximize window button is moused over. This requires the WM_NCHITTEST message to handle hit detection for the button. Since WM_NCHITTEST messages are very common, although we limit them to no more than every 50ms, we don't want to do a full hit test each time. Instead, we cache the maximize button rect in the widget when it is positioned during layout. Differential Revision: https://phabricator.services.mozilla.com/D123982
29 lines
1.3 KiB
HTML
29 lines
1.3 KiB
HTML
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
<hbox class="titlebar-buttonbox-container" skipintoolbarset="true">
|
|
<hbox class="titlebar-buttonbox titlebar-color">
|
|
<toolbarbutton class="titlebar-button titlebar-min"
|
|
oncommand="window.minimize();"
|
|
data-l10n-id="browser-window-minimize-button"
|
|
/>
|
|
<!-- titlebar-max-btn is a special attribute used to identify the maximize
|
|
button elements programmatically -->
|
|
<toolbarbutton class="titlebar-button titlebar-max"
|
|
titlebar-max-btn=""
|
|
oncommand="window.maximize();"
|
|
data-l10n-id="browser-window-maximize-button"
|
|
/>
|
|
<toolbarbutton class="titlebar-button titlebar-restore"
|
|
titlebar-max-btn=""
|
|
oncommand="window.restore();"
|
|
data-l10n-id="browser-window-restore-down-button"
|
|
/>
|
|
<toolbarbutton class="titlebar-button titlebar-close"
|
|
command="cmd_closeWindow"
|
|
data-l10n-id="browser-window-close-button"
|
|
/>
|
|
</hbox>
|
|
</hbox>
|