summaryrefslogtreecommitdiff
path: root/src/gui_beval.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-09-09 18:45:26 +0200
committerBram Moolenaar <Bram@vim.org>2017-09-09 18:45:26 +0200
commit7be9b50fd7e238722c9ba5c0ef1d2a7e7e52b9e3 (patch)
treef1a9c077e1846b5926b91b8221edc7fb0c12797f /src/gui_beval.c
parent5b5adf5b9cd226d775643872e65c62674d6ada95 (diff)
downloadvim-git-7be9b50fd7e238722c9ba5c0ef1d2a7e7e52b9e3.tar.gz
patch 8.0.1084: GTK build has compiler warningsv8.0.1084
Problem: GTK build has compiler warnings. (Christian Brabandt) Solution: Get screen size with a different function. (Ken Takata, Yasuhiro Matsumoto)
Diffstat (limited to 'src/gui_beval.c')
-rw-r--r--src/gui_beval.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/gui_beval.c b/src/gui_beval.c
index abff1b091..61ff2fc79 100644
--- a/src/gui_beval.c
+++ b/src/gui_beval.c
@@ -1177,23 +1177,15 @@ drawBalloon(BalloonEval *beval)
int x_offset = EVAL_OFFSET_X;
int y_offset = EVAL_OFFSET_Y;
PangoLayout *layout;
-# if GTK_CHECK_VERSION(3,22,2)
- GdkRectangle rect;
- GdkMonitor * const mon = gdk_display_get_monitor_at_window(
- gtk_widget_get_display(beval->balloonShell),
- gtk_widget_get_window(beval->balloonShell));
- gdk_monitor_get_geometry(mon, &rect);
-
- screen_w = rect.width;
- screen_h = rect.height;
-# else
+
+# if !GTK_CHECK_VERSION(3,22,2)
GdkScreen *screen;
screen = gtk_widget_get_screen(beval->target);
gtk_window_set_screen(GTK_WINDOW(beval->balloonShell), screen);
- screen_w = gdk_screen_get_width(screen);
- screen_h = gdk_screen_get_height(screen);
# endif
+ gui_gtk_get_screen_size_of_win(beval->balloonShell,
+ &screen_w, &screen_h);
# if !GTK_CHECK_VERSION(3,0,0)
gtk_widget_ensure_style(beval->balloonShell);
gtk_widget_ensure_style(beval->balloonLabel);