summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZenWalker <[email protected]>2017-08-22 16:52:27 +0200
committerZenWalker <[email protected]>2017-08-22 16:52:27 +0200
commit1ace0249492d8710c5e1d416f595b523e4e63dfa (patch)
tree1adad77347ba6915fb4ebbe200eef9a39189367b
parent5bece5503aba40119eea2e2d5e18f219749472be (diff)
downloadpluma-1ace0249492d8710c5e1d416f595b523e4e63dfa.tar.bz2
pluma-1ace0249492d8710c5e1d416f595b523e4e63dfa.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
-rw-r--r--pluma/pluma-window.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/pluma/pluma-window.c b/pluma/pluma-window.c
index 8c5d95ba..4c257fba 100644
--- a/pluma/pluma-window.c
+++ b/pluma/pluma-window.c
@@ -2795,14 +2795,25 @@ static void
fullscreen_controls_show (PlumaWindow *window)
{
GdkScreen *screen;
+#if GTK_CHECK_VERSION (3, 22, 0)
+ GdkDisplay *display;
+#endif
GdkRectangle fs_rect;
gint w, h;
screen = gtk_window_get_screen (GTK_WINDOW (window));
+#if GTK_CHECK_VERSION (3, 22, 0)
+ display = gdk_screen_get_display (screen);
+
+ gdk_monitor_get_geometry (gdk_display_get_monitor_at_window (display,
+ gtk_widget_get_window (GTK_WIDGET (window))),
+ &fs_rect);
+#else
gdk_screen_get_monitor_geometry (screen,
gdk_screen_get_monitor_at_window (screen,
gtk_widget_get_window (GTK_WIDGET (window))),
&fs_rect);
+#endif
gtk_window_get_size (GTK_WINDOW (window->priv->fullscreen_controls), &w, &h);
@@ -2820,14 +2831,25 @@ run_fullscreen_animation (gpointer data)
{
PlumaWindow *window = PLUMA_WINDOW (data);
GdkScreen *screen;
+#if GTK_CHECK_VERSION (3, 22, 0)
+ GdkDisplay *display;
+#endif
GdkRectangle fs_rect;
gint x, y;
screen = gtk_window_get_screen (GTK_WINDOW (window));
+#if GTK_CHECK_VERSION (3, 22, 0)
+ display = gdk_screen_get_display (screen);
+
+ gdk_monitor_get_geometry (gdk_display_get_monitor_at_window (display,
+ gtk_widget_get_window (GTK_WIDGET (window))),
+ &fs_rect);
+#else
gdk_screen_get_monitor_geometry (screen,
gdk_screen_get_monitor_at_window (screen,
gtk_widget_get_window (GTK_WIDGET (window))),
&fs_rect);
+#endif
gtk_window_get_position (GTK_WINDOW (window->priv->fullscreen_controls),
&x, &y);
@@ -2897,12 +2919,23 @@ show_hide_fullscreen_toolbar (PlumaWindow *window,
{
GdkRectangle fs_rect;
GdkScreen *screen;
+#if GTK_CHECK_VERSION (3, 22, 0)
+ GdkDisplay *display;
+#endif
screen = gtk_window_get_screen (GTK_WINDOW (window));
+#if GTK_CHECK_VERSION (3, 22, 0)
+ display = gdk_screen_get_display (screen);
+
+ gdk_monitor_get_geometry (gdk_display_get_monitor_at_window (display,
+ gtk_widget_get_window (GTK_WIDGET (window))),
+ &fs_rect);
+#else
gdk_screen_get_monitor_geometry (screen,
gdk_screen_get_monitor_at_window (screen,
gtk_widget_get_window (GTK_WIDGET (window))),
&fs_rect);
+#endif
if (show)
gtk_window_move (GTK_WINDOW (window->priv->fullscreen_controls),