Mercurial > vim
diff src/gui_gtk.c @ 14712:82e7ce311065 v8.1.0368
patch 8.1.0368: GTK code has too many #ifdefs and GTK 2.10 building fails
commit https://github.com/vim/vim/commit/25328e39d2a6e3ded82bf282a2e248ce7209f1b4
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Sep 11 21:30:09 2018 +0200
patch 8.1.0368: GTK code has too many #ifdefs and GTK 2.10 building fails
Problem: GTK code has too many #ifdefs and building fails with GTK 2.10.
Solution: Always use gtk_widget_get_window() and define it for older GTK
versions. (Ken Takata, closes #3421)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 11 Sep 2018 21:45:06 +0200 |
parents | 8412df1479a3 |
children | 11978f68a8c3 |
line wrap: on
line diff
--- a/src/gui_gtk.c +++ b/src/gui_gtk.c @@ -1932,11 +1932,7 @@ popup_menu_position_func(GtkMenu *menu U gboolean *push_in UNUSED, gpointer user_data UNUSED) { -# if GTK_CHECK_VERSION(3,0,0) gdk_window_get_origin(gtk_widget_get_window(gui.drawarea), x, y); -# else - gdk_window_get_origin(gui.drawarea->window, x, y); -# endif if (popup_mouse_pos) { @@ -1946,12 +1942,8 @@ popup_menu_position_func(GtkMenu *menu U *x += mx; *y += my; } -# if GTK_CHECK_VERSION(3,0,0) else if (curwin != NULL && gui.drawarea != NULL && gtk_widget_get_window(gui.drawarea) != NULL) -# else - else if (curwin != NULL && gui.drawarea != NULL && gui.drawarea->window != NULL) -# endif { /* Find the cursor position in the current window */ *x += FILL_X(curwin->w_wincol + curwin->w_wcol + 1) + 1;