From aa719a4066a858c92c4b358351ab6f6a2053ea89 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Tue, 17 Sep 2024 11:56:43 +0200 Subject: [PATCH] fix: resizing border on Linux WCO caption buttons (#43724) 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. --- shell/browser/ui/views/opaque_frame_view.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/shell/browser/ui/views/opaque_frame_view.cc b/shell/browser/ui/views/opaque_frame_view.cc index f6b379ca6f5b..0207fb0ddeb6 100644 --- a/shell/browser/ui/views/opaque_frame_view.cc +++ b/shell/browser/ui/views/opaque_frame_view.cc @@ -135,6 +135,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))