summaryrefslogtreecommitdiff
path: root/libdocument
diff options
context:
space:
mode:
Diffstat (limited to 'libdocument')
-rw-r--r--libdocument/ev-document-misc.c18
-rw-r--r--libdocument/ev-document-misc.h6
2 files changed, 1 insertions, 23 deletions
diff --git a/libdocument/ev-document-misc.c b/libdocument/ev-document-misc.c
index 88935c73..87364525 100644
--- a/libdocument/ev-document-misc.c
+++ b/libdocument/ev-document-misc.c
@@ -395,11 +395,7 @@ ev_document_misc_invert_pixbuf (GdkPixbuf *pixbuf)
}
gdouble
-#if GTK_CHECK_VERSION (3, 22, 0)
ev_document_misc_get_screen_dpi (GdkScreen *screen, GdkMonitor *monitor)
-#else
-ev_document_misc_get_screen_dpi (GdkScreen *screen, gint monitor)
-#endif
{
gdouble dp, di;
@@ -407,13 +403,8 @@ ev_document_misc_get_screen_dpi (GdkScreen *screen, gint monitor)
dp = hypot (WidthOfScreen (gdk_x11_screen_get_xscreen (screen)), HeightOfScreen (gdk_x11_screen_get_xscreen (screen)));
/*diagonal in inches*/
-#if GTK_CHECK_VERSION (3, 22, 0)
di = hypot (gdk_monitor_get_width_mm(monitor), gdk_monitor_get_height_mm (monitor)) / 25.4;
di /= gdk_monitor_get_scale_factor (monitor);
-#else
- di = hypot (gdk_screen_get_width_mm(screen), gdk_screen_get_height_mm (screen)) / 25.4;
- di /= gdk_screen_get_monitor_scale_factor(screen, monitor);
-#endif
return (dp / di);
}
@@ -446,11 +437,7 @@ ev_document_misc_get_pointer_position (GtkWidget *widget,
gint *x,
gint *y)
{
-#if GTK_CHECK_VERSION (3, 20, 0)
GdkSeat *seat;
-#else
- GdkDeviceManager *device_manager;
-#endif
GdkDevice *device_pointer;
GdkRectangle allocation;
@@ -462,13 +449,8 @@ ev_document_misc_get_pointer_position (GtkWidget *widget,
if (!gtk_widget_get_realized (widget))
return;
-#if GTK_CHECK_VERSION (3, 20, 0)
seat = gdk_display_get_default_seat (gtk_widget_get_display (widget));
device_pointer = gdk_seat_get_pointer (seat);
-#else
- device_manager = gdk_display_get_device_manager (gtk_widget_get_display (widget));
- device_pointer = gdk_device_manager_get_client_pointer (device_manager);
-#endif
gdk_window_get_device_position (gtk_widget_get_window (widget),
device_pointer,
x, y, NULL);
diff --git a/libdocument/ev-document-misc.h b/libdocument/ev-document-misc.h
index 25e3b8ce..50eb4089 100644
--- a/libdocument/ev-document-misc.h
+++ b/libdocument/ev-document-misc.h
@@ -56,13 +56,9 @@ cairo_surface_t *ev_document_misc_surface_rotate_and_scale (cairo_surface_t *sur
gint dest_height,
gint dest_rotation);
void ev_document_misc_invert_surface (cairo_surface_t *surface);
-void ev_document_misc_invert_pixbuf (GdkPixbuf *pixbuf);
+void ev_document_misc_invert_pixbuf (GdkPixbuf *pixbuf);
-#if GTK_CHECK_VERSION (3, 22, 0)
gdouble ev_document_misc_get_screen_dpi (GdkScreen *screen, GdkMonitor *monitor);
-#else
-gdouble ev_document_misc_get_screen_dpi (GdkScreen *screen, gint monitor);
-#endif
gchar *ev_document_misc_format_date (GTime utime);