Improve the resizing experience of frameless windows
Minor
Commit Hash:
0780bb2fc737e8061acd3af2441ed19aacc2fc95
Commit Time: 2025-03-28 16:26:47+00:00
Impact Level: Minor
Generated By: webview2-upstream-sentry
Upstream Review:
View Upstream Review 🔗
📋 Summary
This submission primarily targets the NativeWidgetMacNSWindow of remote_cocoa on macOS, optimizing the border dragging experience for non-titled resizable windows (such as glic windows). By overriding the private NSWindow method _getExteriorResizeEdgeThicknesses:forStyleMask:, non-titled resizable windows now adopt the same exterior drag border thickness as titled windows, thereby improving the usability of window resizing via dragging. This change only affects the hit area of the window border and does not involve core logic such as window management, lifecycle, or Mojo interfaces.
🎯 Impact Analysis
This change only affects the window drag-to-resize experience on macOS, enhancing the user interaction friendliness of frameless resizable windows. For WebView2Mac, if its downstream window implementation inherits from NativeWidgetMacNSWindow and adopts the frameless resizable style, it will directly benefit from a larger drag area, improving the window usability of the host application. This change does not affect core functionalities such as window lifecycle management, Mojo communication, NSView embedding, or window event dispatching, and has no negative impact on the functionality or performance of WebView2Mac. If WebView2Mac does not use frameless resizable windows, there is no actual impact.
Impacted Classes:
NativeWidgetMacNSWindow
NSWindow (NSWindowResizing category)