2017-09-10 1:45 GMT+09:00 Bram Moolenaar <b...@moolenaar.net>:

>
> Patch 8.0.1084
> Problem:    GTK build has compiler warnings. (Christian Brabandt)
> Solution:   Get screen size with a different function. (Ken Takata,
> Yasuhiro
>             Matsumoto)
> Files:      src/mbyte.c, src/gui_gtk_x11.c, src/proto/gui_gtk_x11.pro,
>             src/gui_beval.c
>

Hi Bram,

The GTK+ 3 GUI won't compile with this patch since the first parameter of
the function gui_gtk_get_screen_size_of_win() butts a local variable of the
same name.  I hope the attached patch will fix it.

Regards,
Kazunobu


>
--
> The primary purpose of the DATA statement is to give names to constants;
> instead of referring to pi as 3.141592653589793 at every appearance, the
> variable PI can be given that value with a DATA statement and used instead
> of the longer form of the constant.  This also simplifies modifying the
> program, should the value of pi change.
>         -- FORTRAN manual for Xerox Computers
>
>  /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net
>  \\\
> ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/
> \\\
> \\\  an exciting new programming language -- http://www.Zimbu.org
> ///
>  \\\            help me help AIDS victims -- http://ICCF-Holland.org
> ///
>
> --
> --
> You received this message from the "vim_dev" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups
> "vim_dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to vim_dev+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
index 510986549..9225375a1 100644
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -4942,11 +4942,11 @@ gui_mch_set_shellsize(int width, int height,
 }
 
     void
-gui_gtk_get_screen_size_of_win(GtkWidget *win, int *width, int *height)
+gui_gtk_get_screen_size_of_win(GtkWidget *wid, int *width, int *height)
 {
 #if GTK_CHECK_VERSION(3,22,0)
-    GdkDisplay *dpy = gtk_widget_get_display(win);
-    GdkWindow *win = gtk_widget_get_window(win);
+    GdkDisplay *dpy = gtk_widget_get_display(wid);
+    GdkWindow *win = gtk_widget_get_window(wid);
     GdkMonitor *monitor = gdk_display_get_monitor_at_window(dpy, win);
     GdkRectangle geometry;
 
@@ -4956,8 +4956,8 @@ gui_gtk_get_screen_size_of_win(GtkWidget *win, int 
*width, int *height)
 #else
     GdkScreen* screen;
 
-    if (win != NULL && gtk_widget_has_screen(win))
-       screen = gtk_widget_get_screen(win);
+    if (wid != NULL && gtk_widget_has_screen(wid))
+       screen = gtk_widget_get_screen(wid);
     else
        screen = gdk_screen_get_default();
     *width = gdk_screen_get_width(screen);

Raspunde prin e-mail lui