Compare commits
2 Commits
e64a071e39
...
894e6d27a4
Author | SHA1 | Date |
---|---|---|
Paul Davis | 894e6d27a4 | |
Paul Davis | c96e12ba58 |
|
@ -604,7 +604,7 @@
|
|||
|
||||
- (void) setNeedsDisplay:(BOOL)yn
|
||||
{
|
||||
if (GDK_WINDOW_DESTROYED (gdk_window)) {
|
||||
if (!gdk_window || GDK_WINDOW_DESTROYED (gdk_window)) {
|
||||
[super setNeedsDisplay:yn];
|
||||
return;
|
||||
}
|
||||
|
@ -619,12 +619,12 @@
|
|||
|
||||
NSRect nsrect = [self bounds];
|
||||
GdkRectangle r = { nsrect.origin.x, nsrect.origin.y, nsrect.size.width, nsrect.size.height };
|
||||
|
||||
|
||||
GDK_NOTE (EVENTS, g_print ("setNeedsDisplay, current NDR %p\n", impl->needs_display_region));
|
||||
|
||||
if (!impl->needs_display_region)
|
||||
impl->needs_display_region = gdk_region_rectangle (&r);
|
||||
else
|
||||
else
|
||||
gdk_region_union_with_rect (impl->needs_display_region, &r);
|
||||
|
||||
#if 0
|
||||
|
@ -643,12 +643,17 @@
|
|||
|
||||
- (void) setNeedsDisplayInRect:(NSRect)rect
|
||||
{
|
||||
if (!gdk_window || GDK_WINDOW_DESTROYED (gdk_window)) {
|
||||
[super setNeedsDisplayInRect:rect];
|
||||
return;
|
||||
}
|
||||
|
||||
GdkWindowObject* private = GDK_WINDOW_OBJECT (gdk_window);
|
||||
GdkWindowImplQuartz* impl = GDK_WINDOW_IMPL_QUARTZ (private->impl);
|
||||
|
||||
if (!impl) {
|
||||
[super setNeedsDisplayInRect:rect];
|
||||
return;
|
||||
[super setNeedsDisplayInRect:rect];
|
||||
return;
|
||||
}
|
||||
|
||||
GdkRectangle r = { rect.origin.x, rect.origin.y, rect.size.width, rect.size.height };
|
||||
|
@ -665,7 +670,7 @@
|
|||
|
||||
if (!impl->needs_display_region)
|
||||
impl->needs_display_region = gdk_region_rectangle (&r);
|
||||
else
|
||||
else
|
||||
gdk_region_union_with_rect (impl->needs_display_region, &r);
|
||||
|
||||
#if 0
|
||||
|
@ -678,7 +683,7 @@
|
|||
printf ("\t%d,%d %d x %d\n", rects[n].x, rects[n].y, rects[n].width, rects[n].height);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
[super setNeedsDisplayInRect:rect];
|
||||
}
|
||||
|
||||
|
@ -754,7 +759,7 @@
|
|||
printf ("\t%d,%d %d x %d\n", rects[n].x, rects[n].y, rects[n].width, rects[n].height);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
impl->in_paint_rect_count++;
|
||||
/* this essentially generates an expose event */
|
||||
_gdk_window_process_updates_recurse (gdk_window, region);
|
||||
|
@ -764,7 +769,7 @@
|
|||
{
|
||||
impl->needs_display_region = NULL;
|
||||
}
|
||||
|
||||
|
||||
gdk_region_destroy (region);
|
||||
|
||||
if (needsInvalidateShadow)
|
||||
|
@ -800,7 +805,7 @@
|
|||
|
||||
if (impl->needs_display_region)
|
||||
gdk_region_destroy (impl->needs_display_region);
|
||||
|
||||
|
||||
impl->needs_display_region = gdk_region_rectangle (&r);
|
||||
|
||||
#if 0
|
||||
|
|
Loading…
Reference in New Issue