Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit662642c

Browse files
committed
FIX: Disable cursorRect updates from within macosx backend
We want to keep control of the cursor updates from within MPL, sodon't allow the App to push a new cursor update when the windowgets updated. This would happen when a TextView would get resizedand update the frame.
1 parentf732864 commit662642c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎src/_macosx.m‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,10 @@ static CGFloat _get_device_scale(CGContextRef cr)
588588
Window* window = self->window;
589589
[windowsetDelegate: view];
590590
[windowmakeFirstResponder: view];
591+
// Disable cursorRects so that the cursor doesn't get updated by events
592+
// in NSApp (like resizing TextViews), we want to handle the cursor
593+
// changes from within MPL with set_cursor() ourselves
594+
[windowdisableCursorRects];
591595
[[windowcontentView]addSubview: view];
592596
[viewupdateDevicePixelRatio: [windowbackingScaleFactor]];
593597

@@ -989,9 +993,6 @@ -(void)save_figure:(id)sender { gil_call_method(toolbar, "save_figure"); }
989993
[messageboxsetFrame: rect];
990994
// We want to control the vertical position of
991995
// the rect by the content size to center it vertically
992-
// TODO: This seems to disable the cursor updates with newlines that
993-
// are included in the image hover text. It is only when trying
994-
// to set the frame height based on the contentRect's size.
995996
[messagebox.layoutManagerensureLayoutForTextContainer: messagebox.textContainer];
996997
NSRect contentRect = [messagebox.layoutManagerusedRectForTextContainer: messagebox.textContainer];
997998
rect.origin.y =0.5 * (self->height - contentRect.size.height);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp