summaryrefslogtreecommitdiff
path: root/capplets/appearance/appearance-desktop.c
diff options
context:
space:
mode:
authormonsta <[email protected]>2018-01-28 22:42:47 +0300
committerraveit65 <[email protected]>2018-01-30 20:11:14 +0100
commit2be32a55532fbb010f83472064435aae49e36270 (patch)
tree8a57f8d9d0b17ea7d4277c5d167c6eee4d0164b8 /capplets/appearance/appearance-desktop.c
parent312edc87dae270e11ce2955c7c26b3387ae94985 (diff)
downloadmate-control-center-2be32a55532fbb010f83472064435aae49e36270.tar.bz2
mate-control-center-2be32a55532fbb010f83472064435aae49e36270.tar.xz
require GTK+ 3.22 and GLib 2.50
Diffstat (limited to 'capplets/appearance/appearance-desktop.c')
-rw-r--r--capplets/appearance/appearance-desktop.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/capplets/appearance/appearance-desktop.c b/capplets/appearance/appearance-desktop.c
index ee5d1427..545f6c12 100644
--- a/capplets/appearance/appearance-desktop.c
+++ b/capplets/appearance/appearance-desktop.c
@@ -883,20 +883,12 @@ static gdouble
get_monitor_aspect_ratio_for_widget (GtkWidget *widget)
{
gdouble aspect;
-#if GTK_CHECK_VERSION (3, 22, 0)
GdkMonitor *monitor;
-#else
- gint monitor;
-#endif
GdkRectangle rect;
-#if GTK_CHECK_VERSION (3, 22, 0)
monitor = gdk_display_get_monitor_at_window (gtk_widget_get_display (widget), gtk_widget_get_window (widget));
gdk_monitor_get_geometry (monitor, &rect);
-#else
- monitor = gdk_screen_get_monitor_at_window (gtk_widget_get_screen (widget), gtk_widget_get_window (widget));
- gdk_screen_get_monitor_geometry (gtk_widget_get_screen (widget), monitor, &rect);
-#endif
+
aspect = rect.height / (gdouble)rect.width;
return aspect;