fix: resizing border on Linux WCO caption buttons (#43745)

Closes https://github.com/electron/electron/issues/43714.

Fixes an issue where the resizing border was not being handled correctly on Linux WCO
caption buttons. This is now taken into account as a part of the NonClientHitTest.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
trop[bot] 2024-09-17 21:54:10 +02:00 коммит произвёл GitHub
Родитель 0846294d70
Коммит c5e1a336f2
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -136,6 +136,11 @@ gfx::Rect OpaqueFrameView::GetWindowBoundsForClientBounds(
int OpaqueFrameView::NonClientHitTest(const gfx::Point& point) {
if (window()->IsWindowControlsOverlayEnabled()) {
// Ensure support for resizing frameless window with border drag.
int frame_component = ResizingBorderHitTest(point);
if (frame_component != HTNOWHERE)
return frame_component;
if (HitTestCaptionButton(close_button_, point))
return HTCLOSE;
if (HitTestCaptionButton(restore_button_, point))