path: root/src/network
diff options
authorTor Arne Vestbø <>2021-09-15 11:20:39 +0200
committerTor Arne Vestbø <>2021-09-23 17:01:16 +0200
commit4c78ef80ca7573cd2eb054cdf1667837b43e6c58 (patch)
treecedb6b71a3e9f630eb838b37253885f6247a8c78 /src/network
parentfc6eb0bb7ef6b68508633eb7a4aa6193fe29a833 (diff)
macOS: Handle window titlebar buttons independently from style mask
Style masks such as NSWindowStyleMask{Resizable,Miniaturizable} affect whether the window has a title bar button for the action, but also whether the window can be resized or minimized through other means, for example if the window border can be dragged to resize. By decoupling the visibility and enablement of the title bar buttons from the style mask we can individually control the buttons, and leave the style mask set to enable behaviors we always want. We were already doing this for the NSWindowZoomButton. Unfortunately AppKit not only checks NSWindowStyleMaskMiniaturizable during a call to miniaturize, but also whether the title bar button is enabled. To allow minimizing windows without the titlebar button we detect the situation and give AppKit a NSWindowMiniaturizeButton that we haven't disabled. The alternative would be to temporarily enable the NSWindowMiniaturizeButton during the minimize, but this results in the button flashing yellow for the duration of the animation. Task-number: QTBUG-65637 Task-number: QTBUG-46882 Task-number: QTBUG-64994 Task-number: QTBUG-71485 Change-Id: I2c1a9564d8b7516476aa018b2820670199124bc2 Reviewed-by: Volker Hilsheimer <>
Diffstat (limited to 'src/network')
0 files changed, 0 insertions, 0 deletions