Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v6-28] Backport Cocoa #14020

Merged
merged 2 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion graf2d/cocoa/src/QuartzWindow.mm
Original file line number Diff line number Diff line change
Expand Up @@ -2853,7 +2853,9 @@ - (void) drawRect : (NSRect) dirtyRect
if (ViewIsTextView(self)) {
//Send Expose event, using child view (this is how it's done in GUI :( ).
[NSColor.whiteColor setFill];
NSRectFill(dirtyRect);
NSRect frame = self.frame;
frame.origin = {};
NSRectFill(frame);
NSView<X11Window> * const viewFrame = FrameForTextView(self);
if (viewFrame)//Now we set fExposedRegion for TGView.
vx->GetEventTranslator()->GenerateExposeEvent(viewFrame, viewFrame.visibleRect);
Expand Down
7 changes: 0 additions & 7 deletions graf2d/cocoa/src/ROOTOpenGLView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,4 @@ - (BOOL) wantsLayer
return NO;
}

//______________________________________________________________________________

- (void) setLayer:(CALayer *) layer
{
#pragma unused(layer)
}

@end
6 changes: 1 addition & 5 deletions graf2d/cocoa/src/TGCocoa.mm
Original file line number Diff line number Diff line change
Expand Up @@ -363,11 +363,7 @@ void SetFillPattern(CGContextRef ctx, const PatternContext *patternContext)
bool ParentRendersToChild(NSView<X11Window> *child)
{
assert(child != nil && "ParentRendersToChild, parameter 'child' is nil");

//Adovo poluchaetsia, tashhem-ta! ;)
return (X11::ViewIsTextViewFrame(child, true) || X11::ViewIsHtmlViewFrame(child, true)) && !child.fContext &&
child.fMapState == kIsViewable && child.fParentView.fContext &&
!child.fIsOverlapped;
return X11::ViewIsTextViewFrame(child, true) || X11::ViewIsHtmlViewFrame(child, true);
}

class ViewFixer final {
Expand Down