From 957aa75d05c00731d7112bed7b68ce4568667d0c Mon Sep 17 00:00:00 2001 From: Sam Bingner Date: Thu, 13 Dec 2018 15:11:52 -1000 Subject: Update vim --- data/vim/patches/8.1.0249 | 88 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 data/vim/patches/8.1.0249 (limited to 'data/vim/patches/8.1.0249') diff --git a/data/vim/patches/8.1.0249 b/data/vim/patches/8.1.0249 new file mode 100644 index 000000000..772cd519e --- /dev/null +++ b/data/vim/patches/8.1.0249 @@ -0,0 +1,88 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0249 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0249 +Problem: GTK: when screen DPI changes Vim does not handle it. +Solution: Handle the gtk-xft-dpi signal. (Roel van de Kraats, + closes #2357) +Files: src/gui_gtk_x11.c + + +*** ../vim-8.1.0248/src/gui_gtk_x11.c 2018-04-14 13:54:46.000000000 +0200 +--- src/gui_gtk_x11.c 2018-08-07 20:00:51.725991750 +0200 +*************** +*** 788,793 **** +--- 788,816 ---- + } + #endif /* defined(FEAT_CLIENTSERVER) */ + ++ /* ++ * Handle changes to the "Xft/DPI" setting ++ */ ++ static void ++ gtk_settings_xft_dpi_changed_cb(GtkSettings *gtk_settings UNUSED, ++ GParamSpec *pspec UNUSED, ++ gpointer data UNUSED) ++ { ++ // Create a new PangoContext for this screen, and initialize it ++ // with the current font if necessary. ++ if (gui.text_context != NULL) ++ g_object_unref(gui.text_context); ++ ++ gui.text_context = gtk_widget_create_pango_context(gui.mainwin); ++ pango_context_set_base_dir(gui.text_context, PANGO_DIRECTION_LTR); ++ ++ if (gui.norm_font != NULL) ++ { ++ // force default font ++ gui_mch_init_font(*p_guifont == NUL ? NULL : p_guifont, FALSE); ++ gui_set_shellsize(TRUE, FALSE, RESIZE_BOTH); ++ } ++ } + + #if GTK_CHECK_VERSION(3,0,0) + typedef gboolean timeout_cb_type; +*************** +*** 4383,4388 **** +--- 4406,4420 ---- + /* Pretend we don't have input focus, we will get an event if we do. */ + gui.in_focus = FALSE; + ++ // Handle changes to the "Xft/DPI" setting. ++ { ++ GtkSettings *gtk_settings = ++ gtk_settings_get_for_screen(gdk_screen_get_default()); ++ ++ g_signal_connect(gtk_settings, "notify::gtk-xft-dpi", ++ G_CALLBACK(gtk_settings_xft_dpi_changed_cb), NULL); ++ } ++ + return OK; + } + +*** ../vim-8.1.0248/src/version.c 2018-08-07 19:47:46.746434541 +0200 +--- src/version.c 2018-08-07 19:59:06.534596911 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 249, + /**/ + +-- +TALL KNIGHT: Firstly. You must get us another shrubbery! +OTHER KNIGHTS: More shrubberies! More shrubberies for the ex-Knights of Ni! +ARTHUR: Not another shrubbery - + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@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 /// -- cgit v1.2.3