(YDK) amend previous commit, call parent method

This commit is contained in:
Robin Gareus 2024-04-19 16:46:49 +02:00
parent 08e394f681
commit e64a071e39
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04

View file

@ -605,6 +605,7 @@
- (void) setNeedsDisplay:(BOOL)yn - (void) setNeedsDisplay:(BOOL)yn
{ {
if (GDK_WINDOW_DESTROYED (gdk_window)) { if (GDK_WINDOW_DESTROYED (gdk_window)) {
[super setNeedsDisplay:yn];
return; return;
} }
@ -642,8 +643,14 @@
- (void) setNeedsDisplayInRect:(NSRect)rect - (void) setNeedsDisplayInRect:(NSRect)rect
{ {
GdkWindowObject *private; GdkWindowObject* private = GDK_WINDOW_OBJECT (gdk_window);
GdkWindowImplQuartz *impl; GdkWindowImplQuartz* impl = GDK_WINDOW_IMPL_QUARTZ (private->impl);
if (!impl) {
[super setNeedsDisplayInRect:rect];
return;
}
GdkRectangle r = { rect.origin.x, rect.origin.y, rect.size.width, rect.size.height }; GdkRectangle r = { rect.origin.x, rect.origin.y, rect.size.width, rect.size.height };
if (r.width >= 2147483647 || r.height >= 2147483647) { if (r.width >= 2147483647 || r.height >= 2147483647) {
@ -654,13 +661,6 @@
r.height = bounds.size.height; r.height = bounds.size.height;
} }
private = GDK_WINDOW_OBJECT (gdk_window);
impl = GDK_WINDOW_IMPL_QUARTZ (private->impl);
if (!impl) {
return;
}
GDK_NOTE (EVENTS, g_print ("setNeedsDisplayInRect, current NDR %p\n", impl->needs_display_region)); GDK_NOTE (EVENTS, g_print ("setNeedsDisplayInRect, current NDR %p\n", impl->needs_display_region));
if (!impl->needs_display_region) if (!impl->needs_display_region)
@ -679,7 +679,6 @@
} }
#endif #endif
[super setNeedsDisplayInRect:rect]; [super setNeedsDisplayInRect:rect];
} }