summaryrefslogtreecommitdiff
path: root/libre/vim/0001-Fix-widget-sizing-on-current-Gtk-3.22-branch.patch
blob: ea5df7ac34030c72cab59a41c1ef2767e5de7843 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
From 0060136ccbe78ff791e5bd732510cff12094bec9 Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
Date: Sun, 23 Oct 2016 21:12:15 +0200
Subject: [PATCH 1/2] 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 | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
index 388464215fadc3b5..bf3c99ad9a043ad9 100644
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -4429,6 +4429,9 @@ form_configure_event(GtkWidget *widget UNUSED,
 {
     int usable_height = event->height;
 
+    if (event->window != gtk_widget_get_window (gui.formwin))
+	return TRUE;
+
     /* 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.
-- 
2.10.1