summaryrefslogtreecommitdiff
path: root/shell/ev-utils.c
diff options
context:
space:
mode:
authormonsta <[email protected]>2018-01-29 22:22:48 +0300
committerraveit65 <[email protected]>2018-01-31 09:55:09 +0100
commit45cbbd09a196d3143e25db3fe0ae7103388aae10 (patch)
tree2d8e302296e4b3d292db479f24f92d9f7065788b /shell/ev-utils.c
parent32575e23107333add227eaa0501ae3cfe6d4fd8a (diff)
downloadatril-45cbbd09a196d3143e25db3fe0ae7103388aae10.tar.bz2
atril-45cbbd09a196d3143e25db3fe0ae7103388aae10.tar.xz
require GTK+ 3.22 and GLib 2.50
Diffstat (limited to 'shell/ev-utils.c')
-rw-r--r--shell/ev-utils.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/shell/ev-utils.c b/shell/ev-utils.c
index d4a8ff76..342f838e 100644
--- a/shell/ev-utils.c
+++ b/shell/ev-utils.c
@@ -26,7 +26,6 @@
#include <string.h>
#include <glib/gi18n.h>
-#if GTK_CHECK_VERSION(3, 22, 0)
static int
_gtk_get_monitor_num (GdkMonitor *monitor)
{
@@ -43,7 +42,6 @@ _gtk_get_monitor_num (GdkMonitor *monitor)
return -1;
}
-#endif
static void
ev_gui_sanitise_popup_position (GtkMenu *menu,
@@ -51,13 +49,8 @@ ev_gui_sanitise_popup_position (GtkMenu *menu,
gint *x,
gint *y)
{
-#if GTK_CHECK_VERSION (3, 22, 0)
GdkDisplay *display = gtk_widget_get_display (widget);
GdkMonitor *monitor_num;
-#else
- GdkScreen *screen = gtk_widget_get_screen (widget);
- gint monitor_num;
-#endif
GdkRectangle monitor;
GtkRequisition req;
@@ -65,15 +58,9 @@ ev_gui_sanitise_popup_position (GtkMenu *menu,
gtk_widget_get_preferred_size (GTK_WIDGET (menu), &req, NULL);
-#if GTK_CHECK_VERSION (3, 22, 0)
monitor_num = gdk_display_get_monitor_at_point (display, *x, *y);
gtk_menu_set_monitor (menu, _gtk_get_monitor_num (monitor_num));
gdk_monitor_get_geometry (monitor_num, &monitor);
-#else
- monitor_num = gdk_screen_get_monitor_at_point (screen, *x, *y);
- gtk_menu_set_monitor (menu, monitor_num);
- gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
-#endif
*x = CLAMP (*x, monitor.x, monitor.x + MAX (0, monitor.width - req.width));
*y = CLAMP (*y, monitor.y, monitor.y + MAX (0, monitor.height - req.height));