Skip to content

Fix native titlebar dragging on macOS#231

Open
KCKT0112 wants to merge 1 commit into
stdware:mainfrom
KCKT0112:fix-cocoa-native-titlebar-drag
Open

Fix native titlebar dragging on macOS#231
KCKT0112 wants to merge 1 commit into
stdware:mainfrom
KCKT0112:fix-cocoa-native-titlebar-drag

Conversation

@KCKT0112

@KCKT0112 KCKT0112 commented Jun 8, 2026

Copy link
Copy Markdown

Summary

  • add a macOS window attribute, native-titlebar-draggable, to restore dragging from the native titlebar area
  • use performWindowDragWithEvent: for left mouse down events in the native titlebar while preserving traffic-light button clicks
  • reapply the setting when the NSWindow becomes available

Notes

  • Default behavior is unchanged; the new handling is only enabled when the attribute is set to true.
  • Handles both flipped and non-flipped NSView coordinate systems.

Testing

  • Built QWKCore/QWKQuick as part of the downstream Qt 6.9.3 app build on macOS
  • Verified the downstream app can drag from the native traffic-light titlebar area without making the custom header draggable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant