0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

patch 8.0.0089

Problem:    Various problems with GTK 3.22.2.
Solution:   Fix the problems, add #ifdefs. (Kazunobu Kuriyama)
This commit is contained in:
Bram Moolenaar
2016-11-17 19:11:55 +01:00
parent cc28e2d05d
commit a859f04b4d
4 changed files with 188 additions and 2 deletions

View File

@@ -1178,12 +1178,23 @@ drawBalloon(BalloonEval *beval)
int y_offset = EVAL_OFFSET_Y;
PangoLayout *layout;
# ifdef HAVE_GTK_MULTIHEAD
# 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
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
# else
screen_w = gdk_screen_width();
screen_h = gdk_screen_height();