diff options
author | Matthias Clasen <mclasen@redhat.com> | 2019-04-21 12:06:11 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2019-05-28 20:25:14 +0000 |
commit | 2855729cb441c854c8493baf714d8e7b385f2a63 (patch) | |
tree | f9980f3a58eb7078f56d1b1a1139d7ddbf7a224f /gdk/quartz | |
parent | 1a23ebf10541944438c736feea4dd6ca619b186d (diff) | |
download | gtk+-2855729cb441c854c8493baf714d8e7b385f2a63.tar.gz |
gdk: Drop input-only surfaces
We are not creating such surfaces anymore, and
they were only ever meaningfully implemented
on X11. Drop the concept, and the api for determining
if a surface is input-only.
Diffstat (limited to 'gdk/quartz')
-rw-r--r-- | gdk/quartz/gdksurface-quartz.c | 77 |
1 files changed, 37 insertions, 40 deletions
diff --git a/gdk/quartz/gdksurface-quartz.c b/gdk/quartz/gdksurface-quartz.c index b955e8c021..78b8d0cf5b 100644 --- a/gdk/quartz/gdksurface-quartz.c +++ b/gdk/quartz/gdksurface-quartz.c @@ -1139,56 +1139,53 @@ move_resize_window_internal (GdkSurface *window, } else { - if (!window->input_only) - { - NSRect nsrect; + NSRect nsrect; - nsrect = NSMakeRect (window->x, window->y, window->width, window->height); + nsrect = NSMakeRect (window->x, window->y, window->width, window->height); - /* The newly visible area of this window in a coordinate - * system rooted at the origin of this window. - */ - new_visible.x = -window->x; - new_visible.y = -window->y; - new_visible.width = old_visible.width; /* parent has not changed size */ - new_visible.height = old_visible.height; /* parent has not changed size */ + /* The newly visible area of this window in a coordinate + * system rooted at the origin of this window. + */ + new_visible.x = -window->x; + new_visible.y = -window->y; + new_visible.width = old_visible.width; /* parent has not changed size */ + new_visible.height = old_visible.height; /* parent has not changed size */ - expose_region = cairo_region_create_rectangle (&new_visible); - old_region = cairo_region_create_rectangle (&old_visible); - cairo_region_subtract (expose_region, old_region); + expose_region = cairo_region_create_rectangle (&new_visible); + old_region = cairo_region_create_rectangle (&old_visible); + cairo_region_subtract (expose_region, old_region); - /* Determine what (if any) part of the previously visible - * part of the window can be copied without a redraw - */ - scroll_rect = old_visible; - scroll_rect.x -= delta.width; - scroll_rect.y -= delta.height; - gdk_rectangle_intersect (&scroll_rect, &old_visible, &scroll_rect); + /* Determine what (if any) part of the previously visible + * part of the window can be copied without a redraw + */ + scroll_rect = old_visible; + scroll_rect.x -= delta.width; + scroll_rect.y -= delta.height; + gdk_rectangle_intersect (&scroll_rect, &old_visible, &scroll_rect); - if (!cairo_region_is_empty (expose_region)) + if (!cairo_region_is_empty (expose_region)) + { + if (scroll_rect.width != 0 && scroll_rect.height != 0) { - if (scroll_rect.width != 0 && scroll_rect.height != 0) - { - [impl->view scrollRect:NSMakeRect (scroll_rect.x, - scroll_rect.y, - scroll_rect.width, - scroll_rect.height) + [impl->view scrollRect:NSMakeRect (scroll_rect.x, + scroll_rect.y, + scroll_rect.width, + scroll_rect.height) by:delta]; - } - - [impl->view setFrame:nsrect]; - - gdk_quartz_surface_set_needs_display_in_region (window, expose_region); - } - else - { - [impl->view setFrame:nsrect]; - [impl->view setNeedsDisplay:YES]; } - cairo_region_destroy (expose_region); - cairo_region_destroy (old_region); + [impl->view setFrame:nsrect]; + + gdk_quartz_surface_set_needs_display_in_region (window, expose_region); } + else + { + [impl->view setFrame:nsrect]; + [impl->view setNeedsDisplay:YES]; + } + + cairo_region_destroy (expose_region); + cairo_region_destroy (old_region); } GDK_QUARTZ_RELEASE_POOL; |