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

Commit70a8e32

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 parent06ea324 commit70a8e32

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
@@ -565,6 +565,10 @@ static CGFloat _get_device_scale(CGContextRef cr)
565565
Window* window = self->window;
566566
[windowsetDelegate: view];
567567
[windowmakeFirstResponder: view];
568+
// Disable cursorRects so that the cursor doesn't get updated by events
569+
// in NSApp (like resizing TextViews), we want to handle the cursor
570+
// changes from within MPL with set_cursor() ourselves
571+
[windowdisableCursorRects];
568572
[[windowcontentView]addSubview: view];
569573
[viewupdateDevicePixelRatio: [windowbackingScaleFactor]];
570574

@@ -956,9 +960,6 @@ -(void)save_figure:(id)sender { gil_call_method(toolbar, "save_figure"); }
956960
[messageboxsetFrame: rect];
957961
// We want to control the vertical position of
958962
// the rect by the content size to center it vertically
959-
// TODO: This seems to disable the cursor updates with newlines that
960-
// are included in the image hover text. It is only when trying
961-
// to set the frame height based on the contentRect's size.
962963
[messagebox.layoutManagerensureLayoutForTextContainer: messagebox.textContainer];
963964
NSRect contentRect = [messagebox.layoutManagerusedRectForTextContainer: messagebox.textContainer];
964965
rect.origin.y =0.5 * (self->height - contentRect.size.height);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp