Hi,
2017/9/4 Mon 15:31:42 UTC+9 Christian Brabandt wrote:
> On Mi, 30 Aug 2017, Bram Moolenaar wrote:
>
> >
> > Patch 8.0.1026
> > Problem: GTK on-the-spot input has problems. (Gerd Wachsmuth)
> > Solution: Support over-the-spot. (Yukihiro Nakadaira, Ketn Takata, closes
> > #1215)
> > Files: runtime/doc/mbyte.txt, runtime/doc/options.txt, src/edit.c,
> > src/ex_getln.c, src/mbyte.c, src/misc1.c, src/option.c,
> > src/option.h, src/screen.c, src/undo.c,
> > src/testdir/gen_opt_test.vim
>
> I see a couple of GDK warnings in mbyte.c with this patch. See attached
> logfile.
The first two warnings should be fixed by the attached patch.
(Suggested by mattn.)
Regards,
Ken Takata
--
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.
# HG changeset patch
# Parent cae39edf37777565a29a6bb9cf6507bfad571845
diff --git a/src/mbyte.c b/src/mbyte.c
--- a/src/mbyte.c
+++ b/src/mbyte.c
@@ -4904,8 +4904,20 @@ im_preedit_window_set_position(void)
if (preedit_window == NULL)
return;
+#if GTK_CHECK_VERSION(3,22,0)
+ {
+ GdkDisplay *dpy = gtk_widget_get_display(preedit_window);
+ GdkWindow *win = gtk_widget_get_window(preedit_window);
+ GdkMonitor *monitor = gdk_display_get_monitor_at_window(dpy, win);
+ GdkRectangle geometry;
+ gdk_monitor_get_geometry(monitor, &geometry);
+ sw = geometry.width;
+ sh = geometry.height;
+ }
+#else
sw = gdk_screen_get_width(gtk_widget_get_screen(preedit_window));
sh = gdk_screen_get_height(gtk_widget_get_screen(preedit_window));
+#endif
#if GTK_CHECK_VERSION(3,0,0)
gdk_window_get_origin(gtk_widget_get_window(gui.drawarea), &x, &y);
#else