mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 09:29:38 +01:00
JBR-4591 macOS: SIGILL at [libsystem_kernel] __kill in -[__NSMallocBlock__ removeFromSuperview]: unrecognized selector sent to instance
Verified if windowDragView is present
(cherry picked from commit c45d897c4b)
This commit is contained in:
@@ -1411,8 +1411,6 @@ static const CGFloat DefaultHorizontalTitleBarButtonOffset = 20.0;
|
||||
{
|
||||
// See [setUpTransparentTitleBar] for the view hierarchy we're working with
|
||||
NSView* closeButtonView = [self.nsWindow standardWindowButton:NSWindowCloseButton];
|
||||
NSView* zoomButtonView = [self.nsWindow standardWindowButton:NSWindowZoomButton];
|
||||
NSView* miniaturizeButtonView = [self.nsWindow standardWindowButton:NSWindowMiniaturizeButton];
|
||||
NSView* titlebar = closeButtonView.superview;
|
||||
NSView* titlebarContainer = titlebar.superview;
|
||||
if (!titlebarContainer) {
|
||||
@@ -1423,7 +1421,7 @@ static const CGFloat DefaultHorizontalTitleBarButtonOffset = 20.0;
|
||||
|
||||
[NSLayoutConstraint deactivateConstraints:_transparentTitleBarConstraints];
|
||||
|
||||
AWTWindowDragView* windowDragView;
|
||||
AWTWindowDragView* windowDragView = nil;
|
||||
for (NSView* view in [titlebar.subviews arrayByAddingObjectsFromArray:titlebarContainer.subviews]) {
|
||||
if ([view isMemberOfClass:[AWTWindowDragView class]]) {
|
||||
windowDragView = view;
|
||||
@@ -1432,7 +1430,11 @@ static const CGFloat DefaultHorizontalTitleBarButtonOffset = 20.0;
|
||||
view.translatesAutoresizingMaskIntoConstraints = YES;
|
||||
}
|
||||
}
|
||||
|
||||
if (windowDragView != nil) {
|
||||
[windowDragView removeFromSuperview];
|
||||
}
|
||||
|
||||
titlebarContainer.translatesAutoresizingMaskIntoConstraints = YES;
|
||||
titlebar.translatesAutoresizingMaskIntoConstraints = YES;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user