[vim] 05/06: Use Jan Steffens' proposed widget sizing fixes for vim-gtk3

James McCoy jamessan at debian.org
Sat Nov 12 18:19:24 UTC 2016


This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit dd035b89f11b1b1dd9399b695ed3b5211eb41136
Author: James McCoy <jamessan at debian.org>
Date:   Sat Nov 12 13:03:31 2016 -0500

    Use Jan Steffens' proposed widget sizing fixes for vim-gtk3
    
    See https://github.com/vim/vim/pull/1193 and #842070
    Signed-off-by: James McCoy <jamessan at debian.org>
---
 debian/changelog                                   |  3 ++
 ...of-more-LaTeX-commands-for-tex-filetype-d.patch |  2 +-
 ...s-decision-to-disable-modelines-by-defaul.patch |  2 +-
 ...ng-a-vimrc.tiny-when-Vim-is-invoked-as-vi.patch |  4 +--
 debian/patches/series                              |  2 ++
 ...-widget-sizing-on-current-Gtk-3.22-branch.patch | 38 ++++++++++++++++++++++
 .../upstream/Further-fix-widget-sizing.patch       | 25 ++++++++++++++
 ...ing-compilation-date-in-SOURCE_DATE_EPOCH.patch |  6 ++--
 8 files changed, 75 insertions(+), 7 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index d204ae6..2aed66c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,9 @@ vim (2:8.0.0049-1) UNRELEASED; urgency=medium
   * Disable Perl bindings for kfreebsd-* until #827319 is resolved since the
     FTBFS was blocking bootstrapping of kfreebsd systems.
   * Add Zesty Zapus to deb{changelog,sources} syntax files
+  * Cherry-pick two proposed patches to fix vim-gtk3's widget sizing, while
+    upstream Vim and Gtk figure out what the right fix is.  (Related to
+    #842070)
 
  -- James McCoy <jamessan at debian.org>  Sat, 05 Nov 2016 22:14:40 -0400
 
diff --git a/debian/patches/debian/Add-recognition-of-more-LaTeX-commands-for-tex-filetype-d.patch b/debian/patches/debian/Add-recognition-of-more-LaTeX-commands-for-tex-filetype-d.patch
index 9305d1e..18c668d 100644
--- a/debian/patches/debian/Add-recognition-of-more-LaTeX-commands-for-tex-filetype-d.patch
+++ b/debian/patches/debian/Add-recognition-of-more-LaTeX-commands-for-tex-filetype-d.patch
@@ -13,7 +13,7 @@ Signed-off-by: James McCoy <jamessan at debian.org>
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/runtime/filetype.vim b/runtime/filetype.vim
-index 844635e..5daf8de 100644
+index 482ec17..96302f7 100644
 --- a/runtime/filetype.vim
 +++ b/runtime/filetype.vim
 @@ -2221,7 +2221,7 @@ func! s:FTtex()
diff --git a/debian/patches/debian/Document-Debian-s-decision-to-disable-modelines-by-defaul.patch b/debian/patches/debian/Document-Debian-s-decision-to-disable-modelines-by-defaul.patch
index e9d8cce..a3d8ade 100644
--- a/debian/patches/debian/Document-Debian-s-decision-to-disable-modelines-by-defaul.patch
+++ b/debian/patches/debian/Document-Debian-s-decision-to-disable-modelines-by-defaul.patch
@@ -15,7 +15,7 @@ Signed-off-by: James McCoy <jamessan at debian.org>
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
-index eeea3aa..a5d7c3b 100644
+index 390fab0..73c0680 100644
 --- a/runtime/doc/options.txt
 +++ b/runtime/doc/options.txt
 @@ -5122,7 +5122,7 @@ A jump table for the options with a short description can be found at |Q_op|.
diff --git a/debian/patches/debian/Support-sourcing-a-vimrc.tiny-when-Vim-is-invoked-as-vi.patch b/debian/patches/debian/Support-sourcing-a-vimrc.tiny-when-Vim-is-invoked-as-vi.patch
index 4bf71ea..f3a71f5 100644
--- a/debian/patches/debian/Support-sourcing-a-vimrc.tiny-when-Vim-is-invoked-as-vi.patch
+++ b/debian/patches/debian/Support-sourcing-a-vimrc.tiny-when-Vim-is-invoked-as-vi.patch
@@ -70,10 +70,10 @@ index 1070746..0020c58 100644
  # define SYS_VIMRC_FILE "$VIM/vimrc"
  #endif
 diff --git a/src/structs.h b/src/structs.h
-index 2a4284a..d037627 100644
+index bb0fc3a..187b476 100644
 --- a/src/structs.h
 +++ b/src/structs.h
-@@ -3250,6 +3250,9 @@ typedef struct
+@@ -3251,6 +3251,9 @@ typedef struct
  #ifdef FEAT_DIFF
      int		diff_mode;		/* start with 'diff' set */
  #endif
diff --git a/debian/patches/series b/debian/patches/series
index 4eab357..55502ce 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,5 @@ debian/Detect-the-rst-filetype-using-the-contents-of-the-file.patch
 debian/Add-recognition-of-more-LaTeX-commands-for-tex-filetype-d.patch
 debian/Document-Debian-s-decision-to-disable-modelines-by-defaul.patch
 upstream/Add-Zesty-Zapus-to-deb-changelog-sources-syntax-files.patch
+upstream/Fix-widget-sizing-on-current-Gtk-3.22-branch.patch
+upstream/Further-fix-widget-sizing.patch
diff --git a/debian/patches/upstream/Fix-widget-sizing-on-current-Gtk-3.22-branch.patch b/debian/patches/upstream/Fix-widget-sizing-on-current-Gtk-3.22-branch.patch
new file mode 100644
index 0000000..df6d88b
--- /dev/null
+++ b/debian/patches/upstream/Fix-widget-sizing-on-current-Gtk-3.22-branch.patch
@@ -0,0 +1,38 @@
+From: "Jan Alexander Steffens (heftig)" <jan.steffens at gmail.com>
+Date: Sun, 23 Oct 2016 21:12:15 +0200
+Subject: Fix widget sizing on current Gtk+ 3.22 branch
+
+Gtk recently started emitting configure events when repositioning child
+windows[1]. Events for the form's child windows bubble up the widget
+hierarchy, get caught by our configure event handler, and treated as if
+they were reporting the size of the form window. As a result, the shell
+was sized using far too small dimensions[2][3]. This change will be part
+of Gtk+ 3.22.2.
+
+Solve this by checking whether the configure event we get is really for
+the form widget.
+
+[1]: https://git.gnome.org/browse/gtk+/commit/?h=gtk-3-22&id=12579fe71b3b8f79eb9c1b80e429443bcc437dd0
+[2]: https://bugs.archlinux.org/task/51509
+[3]: https://bugzilla.gnome.org/show_bug.cgi?id=773387
+---
+ src/gui_gtk_x11.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
+index 3884642..64edfd4 100644
+--- a/src/gui_gtk_x11.c
++++ b/src/gui_gtk_x11.c
+@@ -4429,6 +4429,12 @@ form_configure_event(GtkWidget *widget UNUSED,
+ {
+     int usable_height = event->height;
+ 
++#if GTK_CHECK_VERSION(3,0,0)
++    if (!gtk_check_version(3, 22, 2) &&
++        event->window != gtk_widget_get_window(gui.formwin))
++	return TRUE;
++#endif
++
+     /* When in a GtkPlug, we can't guarantee valid heights (as a round
+      * no. of char-heights), so we have to manually sanitise them.
+      * Widths seem to sort themselves out, don't ask me why.
diff --git a/debian/patches/upstream/Further-fix-widget-sizing.patch b/debian/patches/upstream/Further-fix-widget-sizing.patch
new file mode 100644
index 0000000..dbf33ba
--- /dev/null
+++ b/debian/patches/upstream/Further-fix-widget-sizing.patch
@@ -0,0 +1,25 @@
+From: "Jan Alexander Steffens (heftig)" <jan.steffens at gmail.com>
+Date: Mon, 24 Oct 2016 19:26:36 +0200
+Subject: Further fix widget sizing
+
+Follow-up by ofourdan in order to fix resizing on maximization. This
+makes the drawing area ignore configure events that weren't explicitly
+sent (such as from GtkForm).
+---
+ src/gui_gtk_x11.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
+index 64edfd4..eda6dc2 100644
+--- a/src/gui_gtk_x11.c
++++ b/src/gui_gtk_x11.c
+@@ -3099,6 +3099,9 @@ drawarea_configure_event_cb(GtkWidget	      *widget,
+     if (event->width == cur_width && event->height == cur_height)
+ 	return TRUE;
+ 
++    if (!gtk_check_version(3, 22, 2) && event->send_event == FALSE)
++	return TRUE;
++
+     cur_width = event->width;
+     cur_height = event->height;
+ 
diff --git a/debian/patches/upstream/Support-defining-compilation-date-in-SOURCE_DATE_EPOCH.patch b/debian/patches/upstream/Support-defining-compilation-date-in-SOURCE_DATE_EPOCH.patch
index e5f5b7b..4b9b322 100644
--- a/debian/patches/upstream/Support-defining-compilation-date-in-SOURCE_DATE_EPOCH.patch
+++ b/debian/patches/upstream/Support-defining-compilation-date-in-SOURCE_DATE_EPOCH.patch
@@ -23,7 +23,7 @@ preprocessor's __DATE__/__TIME__ symbols will be used.
  3 files changed, 19 insertions(+)
 
 diff --git a/src/config.h.in b/src/config.h.in
-index 9d35e48..86ee967 100644
+index 62427e2..2bbf548 100644
 --- a/src/config.h.in
 +++ b/src/config.h.in
 @@ -30,6 +30,9 @@
@@ -37,7 +37,7 @@ index 9d35e48..86ee967 100644
  #undef HAVE_ATTRIBUTE_UNUSED
  
 diff --git a/src/configure.in b/src/configure.in
-index c0a60b2..53650eb 100644
+index 43bf9ad..503ca02 100644
 --- a/src/configure.in
 +++ b/src/configure.in
 @@ -29,6 +29,16 @@ dnl in autoconf needs it, where it uses STDC_HEADERS.
@@ -58,7 +58,7 @@ index c0a60b2..53650eb 100644
  
  AC_MSG_CHECKING(--enable-fail-if-missing argument)
 diff --git a/src/version.c b/src/version.c
-index 4fd2982..f40e771 100644
+index 6fdf9f4..f8397d3 100644
 --- a/src/version.c
 +++ b/src/version.c
 @@ -44,11 +44,17 @@ make_version(void)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git



More information about the pkg-vim-maintainers mailing list