[gtk/wip/otte/gdk: 11/12] macos: Use GdkSurface's scale factor
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/gdk: 11/12] macos: Use GdkSurface's scale factor
- Date: Wed, 31 Mar 2021 02:16:58 +0000 (UTC)
commit 51e7335cb743e1222aeb75bb18fc04ee92160b38
Author: Benjamin Otte <otte redhat com>
Date: Sat Mar 27 02:17:17 2021 +0100
macos: Use GdkSurface's scale factor
gdk/macos/GdkMacosWindow.c | 2 +-
gdk/macos/gdkmacossurface.c | 11 -----------
2 files changed, 1 insertion(+), 12 deletions(-)
---
diff --git a/gdk/macos/GdkMacosWindow.c b/gdk/macos/GdkMacosWindow.c
index f1e5602a36..23c05cb2d7 100644
--- a/gdk/macos/GdkMacosWindow.c
+++ b/gdk/macos/GdkMacosWindow.c
@@ -256,7 +256,7 @@ typedef NSString *CALayerContentsGravity;
[[self contentView] setFrame:NSMakeRect (0, 0, surface->width, surface->height)];
- gdk_surface_update_size (surface, surface->width, surface->height, gdk_surface_get_scale_factor (surface));
+ gdk_surface_update_size (surface, surface->width, surface->height, [self backingScaleFactor]);
gdk_surface_request_layout (surface);
diff --git a/gdk/macos/gdkmacossurface.c b/gdk/macos/gdkmacossurface.c
index 5fe5bb38e7..4f73750d33 100644
--- a/gdk/macos/gdkmacossurface.c
+++ b/gdk/macos/gdkmacossurface.c
@@ -136,16 +136,6 @@ gdk_macos_surface_hide (GdkSurface *surface)
gdk_surface_freeze_updates (GDK_SURFACE (self));
}
-static int
-gdk_macos_surface_get_scale_factor (GdkSurface *surface)
-{
- GdkMacosSurface *self = (GdkMacosSurface *)surface;
-
- g_assert (GDK_IS_MACOS_SURFACE (self));
-
- return [self->window backingScaleFactor];
-}
-
void
_gdk_macos_surface_set_shadow (GdkMacosSurface *surface,
int top,
@@ -501,7 +491,6 @@ gdk_macos_surface_class_init (GdkMacosSurfaceClass *klass)
surface_class->get_device_state = gdk_macos_surface_get_device_state;
surface_class->get_geometry = gdk_macos_surface_get_geometry;
surface_class->get_root_coords = gdk_macos_surface_get_root_coords;
- surface_class->get_scale_factor = gdk_macos_surface_get_scale_factor;
surface_class->hide = gdk_macos_surface_hide;
surface_class->set_input_region = gdk_macos_surface_set_input_region;
surface_class->set_opaque_region = gdk_macos_surface_set_opaque_region;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]