summaryrefslogtreecommitdiff
path: root/libcaja-private
diff options
context:
space:
mode:
authorZenWalker <[email protected]>2017-08-18 19:18:51 +0200
committerraveit65 <[email protected]>2017-08-25 23:03:59 +0200
commit2ff07dcba10019455d0d8c2762c897de6247ac4d (patch)
treefba9112997eae0815d531f3a2604f636a55af559 /libcaja-private
parent2a424fca8bd928223e92570fa692266c471a52b3 (diff)
downloadcaja-2ff07dcba10019455d0d8c2762c897de6247ac4d.tar.bz2
caja-2ff07dcba10019455d0d8c2762c897de6247ac4d.tar.xz
gtk 3.22: avoid deprecated gdk_screen_get_monitor... functions:
avoid deprecated: gdk_screen_get_monitor_geometry gdk_screen_get_monitor_at_window
Diffstat (limited to 'libcaja-private')
-rw-r--r--libcaja-private/caja-icon-container.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libcaja-private/caja-icon-container.c b/libcaja-private/caja-icon-container.c
index aaff045c..c7943964 100644
--- a/libcaja-private/caja-icon-container.c
+++ b/libcaja-private/caja-icon-container.c
@@ -5294,15 +5294,25 @@ caja_icon_container_search_position_func (CajaIconContainer *container,
GdkWindow *cont_window;
GdkScreen *screen;
GtkRequisition requisition;
+#if GTK_CHECK_VERSION (3, 22, 0)
+ GdkMonitor *monitor_num;
+#else
gint monitor_num;
+#endif
GdkRectangle monitor;
cont_window = gtk_widget_get_window (GTK_WIDGET (container));
screen = gdk_window_get_screen (cont_window);
+#if GTK_CHECK_VERSION (3, 22, 0)
+ monitor_num = gdk_display_get_monitor_at_window (gdk_screen_get_display (screen),
+ cont_window);
+ gdk_monitor_get_geometry (monitor_num, &monitor);
+#else
monitor_num = gdk_screen_get_monitor_at_window (screen, cont_window);
gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
+#endif
gtk_widget_realize (search_dialog);