Skip to content

Conversation

@gxalpha
Copy link
Member

@gxalpha gxalpha commented Apr 10, 2022

Description

Backports qt/qtbase@78b6050 and qt/qtbase@3224c6d, fixing the broken macOS
docking and undocking.

These fixes are documented to fix QTBUG-70137, where docks will freak out when getting dragged out of the UI; however they also happens to fix QTBUG-64483 (floating docks randomly deciding they lost their will to live, and no longer being re-dockable) (@RytoEX has been watching that one).

These two bugs were the biggest troublemakers in terms of docking and undocking on macOS.
The patches are no longer needed once we move to QT 6.2 (which is where they are from), but for now I think they are really important (and perhaps could even justify a macOS hotfix on their own).

Motivation and Context

Docking can get very broken on macOS.
This makes it better. Not perfect, but much better..

How Has This Been Tested?

Built on GHA and compiled my OBS against it.
Test QT artifacts here, so that you don't need to wait two hours for QT to compile.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

@WizardCM WizardCM added the macOS label Apr 10, 2022
@RytoEX RytoEX self-assigned this Apr 11, 2022
@RytoEX
Copy link
Member

RytoEX commented Apr 18, 2022

Do we not need the third patch that amends the second patch? See:

Copy link
Member

@RytoEX RytoEX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit message nit: QT -> Qt

@gxalpha
Copy link
Member Author

gxalpha commented Apr 18, 2022

Do we not need the third patch that amends the second patch?

We don't set a custom title bar widget anywhere, which according to the commit message is the only thing that behaves differently with that patch (I'd assume any already floating docks with custom title bars freak out for some reason), so it isn't needed in our case.
That being said, I don't see any harm in adding it either.

@gxalpha
Copy link
Member Author

gxalpha commented Apr 18, 2022

Fixed the commit message, I'll leave the decision on qt/qtbase@ba3e1fe to you, see my comment above.

@RytoEX
Copy link
Member

RytoEX commented Apr 18, 2022

We can leave the third patch out if it's truly not needed. We can always land this now and add it later if we find a need. I'm honestly not entirely sure what cases/issues it fixes.

On the other hand, it might be less annoying to just add it now so we don't have to re-release later should we find it useful.

Thoughts @PatTheMav ?

@PatTheMav
Copy link
Member

There is the potential of the omitted patch fixing other behaviour that later patches somehow rely on, but until that is confirmed I'm fine with it.

@RytoEX
Copy link
Member

RytoEX commented Apr 20, 2022

We don't set a custom title bar widget anywhere

We don't currently, but see obsproject/obs-studio#6358. I don't know if that will be merged, but I'm tempted to err on the side of caution and just include the third patch if that PR would be affected. I'm leaning towards just including the extra patch since it was tagged on the QTBUG, and I don't want to have to remember that we didn't include it if this somehow later comes up.

Otherwise, this seems fine to me, so it will likely be merged one way or another.

@gxalpha
Copy link
Member Author

gxalpha commented Apr 20, 2022

I also saw that PR, and with that in mind I also lean towards including the patch - I'll add it to this PR tomorrow or so

@gxalpha
Copy link
Member Author

gxalpha commented Apr 21, 2022

Added the third patch.
Didn't test it locally since building Qt takes ages on my machine, but as long the patch applies cleanly on CI this should be good (can't see the patch doing any harm tbh).

Edit: CI restored from cache. Are you kidding me? :D

@RytoEX
Copy link
Member

RytoEX commented Apr 21, 2022

Added the third patch. Didn't test it locally since building Qt takes ages on my machine, but as long the patch applies cleanly on CI this should be good (can't see the patch doing any harm tbh).

Edit: CI restored from cache. Are you kidding me? :D

Yeah, the cache key is 'qt-cache-${{ matrix.arch }}-${{ env.QT_REVISION }}', so any build within 7 days that doesn't change the key would use the cache and then skip building. It's kind of a shame it won't restore the cache and then check for new patches. We could probably do it, but it would require reworking the skip step logic. Something like checking if there was a cache-hit and also if the patches folder had changes (via hashFiles or something).

@RytoEX RytoEX mentioned this pull request Apr 26, 2022
6 tasks
Backports 78b6050 and 3224c6d from qt/qtbase, fixing the broken macOS
docking and undocking.
@RytoEX RytoEX merged commit 8386b0e into obsproject:master May 7, 2022
@gxalpha gxalpha deleted the qt-macos-docks branch May 7, 2022 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants