Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

119 lines
5.5KB

  1. diff --git a/src/gui/.obj/qcoregraphics.o b/src/gui/.obj/qcoregraphics.o
  2. index 00f0647..2d1b7da 100644
  3. Binary files a/src/gui/.obj/qcoregraphics.o and b/src/gui/.obj/qcoregraphics.o differ
  4. diff --git a/src/gui/painting/qcoregraphics.mm b/src/gui/painting/qcoregraphics.mm
  5. index c4fb8af..91875cd 100644
  6. --- a/src/gui/painting/qcoregraphics.mm
  7. +++ b/src/gui/painting/qcoregraphics.mm
  8. @@ -47,6 +47,21 @@
  9. #include <QtCore/qcoreapplication.h>
  10. #include <QtCore/qoperatingsystemversion.h>
  11. +@interface NSGraphicsContext (QtAdditions)
  12. +
  13. ++ (NSGraphicsContext *)qt_graphicsContextWithCGContext:(CGContextRef)graphicsPort flipped:(BOOL)initialFlippedState;
  14. +
  15. +@end
  16. +
  17. +@implementation NSGraphicsContext (QtAdditions)
  18. +
  19. ++ (NSGraphicsContext *)qt_graphicsContextWithCGContext:(CGContextRef)graphicsPort flipped:(BOOL)initialFlippedState
  20. +{
  21. + return [self graphicsContextWithGraphicsPort:graphicsPort flipped:initialFlippedState];
  22. +}
  23. +
  24. +@end
  25. +
  26. QT_BEGIN_NAMESPACE
  27. // ---------------------- Images ----------------------
  28. @@ -147,7 +162,7 @@ QPixmap qt_mac_toQPixmap(const NSImage *image, const QSizeF &size)
  29. QMacCGContext ctx(&pixmap);
  30. if (!ctx)
  31. return QPixmap();
  32. - NSGraphicsContext *gc = [NSGraphicsContext graphicsContextWithCGContext:ctx flipped:YES];
  33. + NSGraphicsContext *gc = [NSGraphicsContext qt_graphicsContextWithCGContext:ctx flipped:YES];
  34. if (!gc)
  35. return QPixmap();
  36. [NSGraphicsContext saveGraphicsState];
  37. diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.mm b/src/plugins/platforms/cocoa/qcocoaintegration.mm
  38. index bac49cf..83b51cd 100644
  39. --- a/src/plugins/platforms/cocoa/qcocoaintegration.mm
  40. +++ b/src/plugins/platforms/cocoa/qcocoaintegration.mm
  41. @@ -144,7 +144,7 @@ void QCocoaScreen::updateGeometry()
  42. // The reference screen for the geometry is always the primary screen, but since
  43. // we may be in the process of creating and registering the primary screen, we
  44. // must special-case that and assign it direcly.
  45. - QCocoaScreen *primaryScreen = (nsScreen == [[NSScreen screens] firstObject]) ?
  46. + QCocoaScreen *primaryScreen = (nsScreen == [[NSScreen screens] objectAtIndex:0]) ?
  47. this : static_cast<QCocoaScreen*>(QGuiApplication::primaryScreen()->handle());
  48. m_geometry = primaryScreen->mapFromNative(m_geometry).toRect();
  49. diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
  50. index 56eb291..5d63dea 100644
  51. --- a/src/plugins/platforms/cocoa/qcocoawindow.mm
  52. +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
  53. @@ -858,12 +858,7 @@ void QCocoaWindow::setVisible(bool visible)
  54. applyWindowState(window()->windowState());
  55. if (window()->windowState() != Qt::WindowMinimized) {
  56. - if ((window()->modality() == Qt::WindowModal
  57. - || window()->type() == Qt::Sheet)
  58. - && parentCocoaWindow) {
  59. - // show the window as a sheet
  60. - [parentCocoaWindow->m_nsWindow beginSheet:m_nsWindow completionHandler:nil];
  61. - } else if (window()->modality() != Qt::NonModal) {
  62. + if (window()->modality() != Qt::NonModal) {
  63. // show the window as application modal
  64. QCocoaEventDispatcher *cocoaEventDispatcher = qobject_cast<QCocoaEventDispatcher *>(QGuiApplication::instance()->eventDispatcher());
  65. Q_ASSERT(cocoaEventDispatcher != 0);
  66. @@ -923,11 +918,6 @@ void QCocoaWindow::setVisible(bool visible)
  67. if (cocoaEventDispatcherPrivate)
  68. cocoaEventDispatcherPrivate->endModalSession(window());
  69. m_hasModalSession = false;
  70. - } else {
  71. - if ([m_nsWindow isSheet]) {
  72. - Q_ASSERT_X(parentCocoaWindow, "QCocoaWindow", "Window modal dialog has no transient parent.");
  73. - [parentCocoaWindow->m_nsWindow endSheet:m_nsWindow];
  74. - }
  75. }
  76. hide();
  77. diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm
  78. index e6436f8..db1878a 100644
  79. --- a/src/widgets/styles/qmacstyle_mac.mm
  80. +++ b/src/widgets/styles/qmacstyle_mac.mm
  81. @@ -137,6 +137,21 @@
  82. #include <qpa/qplatformtheme.h>
  83. #include <QtGui/private/qcoregraphics_p.h>
  84. +@interface NSGraphicsContext (QtAdditions)
  85. +
  86. ++ (NSGraphicsContext *)qt_graphicsContextWithCGContext:(CGContextRef)graphicsPort flipped:(BOOL)initialFlippedState;
  87. +
  88. +@end
  89. +
  90. +@implementation NSGraphicsContext (QtAdditions)
  91. +
  92. ++ (NSGraphicsContext *)qt_graphicsContextWithCGContext:(CGContextRef)graphicsPort flipped:(BOOL)initialFlippedState
  93. +{
  94. + return [self graphicsContextWithGraphicsPort:graphicsPort flipped:initialFlippedState];
  95. +}
  96. +
  97. +@end
  98. +
  99. QT_USE_NAMESPACE
  100. static QWindow *qt_getWindow(const QWidget *widget)
  101. @@ -1036,8 +1051,8 @@ void QMacStylePrivate::drawFocusRing(QPainter *p, const QRect &targetRect, int h
  102. CGContextSetAlpha(ctx, 0.5); // As applied to the stroke color below
  103. [NSGraphicsContext saveGraphicsState];
  104. - [NSGraphicsContext setCurrentContext:[NSGraphicsContext graphicsContextWithCGContext:ctx
  105. - flipped:NO]];
  106. + [NSGraphicsContext setCurrentContext:[NSGraphicsContext qt_graphicsContextWithCGContext:ctx
  107. + flipped:NO]];
  108. CGRect focusRingRect = CGRectMake(hMargin, vMargin, size, size);
  109. NSBezierPath *focusRingPath;
  110. if (radius > 0) {