Merge branch 'upstream'

Former-commit-id: 8155aa2276be00b52bf5375dde70754fdd98d9a0
This commit is contained in:
Xamarin Public Jenkins (auto-signing) 2019-10-17 09:37:54 +00:00
commit 236ee2d072
48 changed files with 156 additions and 45 deletions

View File

@ -1 +1 @@
e99de790e27e54ae0cbce0db611ab735386b06d2 5ff3337832dd9373631c72289f1972a02ecaffe9

View File

@ -1 +1 @@
2126007ad631362e44600237a94b76bc10cb7be7 e745c73cd7c45328cc765d02bab525b7edb8d184

View File

@ -224,7 +224,9 @@ class GtkPackage (GitHubPackage):
# https://devdiv.visualstudio.com/DevDiv/_workitems/edit/821841 # https://devdiv.visualstudio.com/DevDiv/_workitems/edit/821841
'patches/gtk/nsview-embedding-skip-hidden-subviews.patch', 'patches/gtk/nsview-embedding-skip-hidden-subviews.patch',
'patches/gtk/0001-gtk-combo-box-native-menu-hook.patch' 'patches/gtk/0001-gtk-combo-box-native-menu-hook.patch',
'patches/gtk/gtkviewport-autoscroll.patch'
]) ])
def prep(self): def prep(self):

View File

@ -0,0 +1,109 @@
diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c
index e564b9af5..24dd9f099 100644
--- a/gtk/gtkviewport.c
+++ b/gtk/gtkviewport.c
@@ -26,6 +26,7 @@
#include "config.h"
#include "gtkviewport.h"
+#include "gtkwindow.h"
#include "gtkintl.h"
#include "gtkmarshalers.h"
#include "gtkprivate.h"
@@ -87,6 +88,8 @@ static void gtk_viewport_adjustment_value_changed (GtkAdjustment *adjustment,
gpointer data);
static void gtk_viewport_style_set (GtkWidget *widget,
GtkStyle *previous_style);
+static void gtk_viewport_set_focus_child (GtkContainer *container,
+ GtkWidget *child);
G_DEFINE_TYPE (GtkViewport, gtk_viewport, GTK_TYPE_BIN)
@@ -114,8 +117,9 @@ gtk_viewport_class_init (GtkViewportClass *class)
widget_class->size_request = gtk_viewport_size_request;
widget_class->size_allocate = gtk_viewport_size_allocate;
widget_class->style_set = gtk_viewport_style_set;
-
+
container_class->add = gtk_viewport_add;
+ container_class->set_focus_child = gtk_viewport_set_focus_child;
class->set_scroll_adjustments = gtk_viewport_set_scroll_adjustments;
@@ -758,6 +762,76 @@ gtk_viewport_add (GtkContainer *container,
GTK_CONTAINER_CLASS (gtk_viewport_parent_class)->add (container, child);
}
+static gboolean
+set_focus_child_cb (gpointer data)
+{
+ GtkWidget *widget;
+ GtkViewport *viewport;
+ GtkWidget *toplevel;
+ GtkWidget *focus;
+ GtkAdjustment *adj;
+ int x, y;
+ GtkAllocation widget_alloc;
+ GtkAllocation focus_alloc;
+ gdouble value;
+
+ widget = (GtkWidget *)data;
+ g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
+
+ toplevel = gtk_widget_get_toplevel (widget);
+ g_return_val_if_fail (GTK_IS_WIDGET (toplevel), FALSE);
+
+ focus = gtk_window_get_focus (GTK_WINDOW (toplevel));
+ if (focus == NULL)
+ return FALSE;
+
+ viewport = GTK_VIEWPORT (widget);
+
+ gtk_widget_get_allocation (focus, &focus_alloc);
+ gtk_widget_get_allocation (widget, &widget_alloc);
+ gtk_widget_translate_coordinates (focus, widget, 0, 0, &x, &y);
+
+ /* Do we need to move vertically? */
+ if (y + focus_alloc.height >= widget_alloc.height)
+ {
+ adj = gtk_viewport_get_vadjustment (viewport);
+ value = gtk_adjustment_get_value (adj) + (y + focus_alloc.height - widget_alloc.height);
+ gtk_adjustment_set_value (adj, value);
+ }
+ else if (y <= widget_alloc.y)
+ {
+ adj = gtk_viewport_get_vadjustment (viewport);
+ value = gtk_adjustment_get_value (adj) - (widget_alloc.y - y);
+ gtk_adjustment_set_value (adj, value);
+ }
+
+ /* Do we need to move horizontally? */
+ if (x + focus_alloc.width >= widget_alloc.width)
+ {
+ adj = gtk_viewport_get_hadjustment (viewport);
+ value = gtk_adjustment_get_value (adj) + (x + focus_alloc.width - widget_alloc.width);
+ gtk_adjustment_set_value (adj, value);
+ }
+ else if (x <= widget_alloc.x)
+ {
+ adj = gtk_viewport_get_hadjustment (viewport);
+ value = gtk_adjustment_get_value (adj) - (widget_alloc.x - x);
+ gtk_adjustment_set_value (adj, value);
+ }
+
+ return FALSE;
+}
+
+static void
+gtk_viewport_set_focus_child (GtkContainer *container,
+ GtkWidget *child)
+{
+ if (child == NULL)
+ return;
+
+ g_idle_add (set_focus_child_cb, container);
+}
+
static void
gtk_viewport_size_request (GtkWidget *widget,
GtkRequisition *requisition)

View File

@ -41,7 +41,7 @@ static partial class Consts
// Use these assembly version constants to make code more maintainable. // Use these assembly version constants to make code more maintainable.
// //
public const string MonoVersion = "6.6.0.128"; public const string MonoVersion = "6.6.0.129";
public const string MonoCompany = "Mono development team"; public const string MonoCompany = "Mono development team";
public const string MonoProduct = "Mono Common Language Infrastructure"; public const string MonoProduct = "Mono Common Language Infrastructure";
public const string MonoCopyright = "(c) Various Mono authors"; public const string MonoCopyright = "(c) Various Mono authors";

View File

@ -1 +1 @@
89e45ec332a791625f1f00a79c83866a1f50581f 300722a98a05bc31dfb3f3fc97aaa86152d6626e

View File

@ -1 +1 @@
f3666c75cf299935ce7d98afad77e3fd806a5947 6ab34de67290bcc7a0088ecd8c8317e457e9bb61

View File

@ -1 +1 @@
6afe3d0aaf1b20c05b5970c395988505e6d81484 0fb6236afda1dcfd99e4adca17530b21360700af

View File

@ -1 +1 @@
79c868774947b3efa0ece81712bb568df8b4927c a1eaa2f68f534f2c4b2ee4b1f772f15b1b67bdcc

View File

@ -1 +1 @@
74f03df4b3bc6d6f248f883fc145547b03970ad9 32f2b24aaa0b03c517b78e71da24e365056ee71f

View File

@ -1 +1 @@
bf559e19a4204224fdaa8166a68a938e4e567afb 2c1857d6aec99e5872da9a31885a3e7ff8d06ced

View File

@ -1 +1 @@
0a008b2c7a75809e566ef96fa411184427d72072 e024162eae00395b415cd344e804a4ac0a841e3a

View File

@ -1 +1 @@
89e45ec332a791625f1f00a79c83866a1f50581f 300722a98a05bc31dfb3f3fc97aaa86152d6626e

View File

@ -1 +1 @@
f3666c75cf299935ce7d98afad77e3fd806a5947 6ab34de67290bcc7a0088ecd8c8317e457e9bb61

View File

@ -1 +1 @@
6afe3d0aaf1b20c05b5970c395988505e6d81484 0fb6236afda1dcfd99e4adca17530b21360700af

View File

@ -1 +1 @@
79c868774947b3efa0ece81712bb568df8b4927c a1eaa2f68f534f2c4b2ee4b1f772f15b1b67bdcc

View File

@ -1 +1 @@
74f03df4b3bc6d6f248f883fc145547b03970ad9 32f2b24aaa0b03c517b78e71da24e365056ee71f

View File

@ -1 +1 @@
bf559e19a4204224fdaa8166a68a938e4e567afb 2c1857d6aec99e5872da9a31885a3e7ff8d06ced

View File

@ -1 +1 @@
9003fa9a075495eb5b115a722c5d7a46b2d5c5a0 70caf6f317b845757690c33fa4621758452fd86b

View File

@ -1 +1 @@
0a008b2c7a75809e566ef96fa411184427d72072 e024162eae00395b415cd344e804a4ac0a841e3a

View File

@ -1 +1 @@
89e45ec332a791625f1f00a79c83866a1f50581f 300722a98a05bc31dfb3f3fc97aaa86152d6626e

View File

@ -1 +1 @@
f3666c75cf299935ce7d98afad77e3fd806a5947 6ab34de67290bcc7a0088ecd8c8317e457e9bb61

View File

@ -1 +1 @@
6afe3d0aaf1b20c05b5970c395988505e6d81484 0fb6236afda1dcfd99e4adca17530b21360700af

View File

@ -1 +1 @@
79c868774947b3efa0ece81712bb568df8b4927c a1eaa2f68f534f2c4b2ee4b1f772f15b1b67bdcc

View File

@ -1 +1 @@
74f03df4b3bc6d6f248f883fc145547b03970ad9 32f2b24aaa0b03c517b78e71da24e365056ee71f

View File

@ -1 +1 @@
bf559e19a4204224fdaa8166a68a938e4e567afb 2c1857d6aec99e5872da9a31885a3e7ff8d06ced

View File

@ -1 +1 @@
9003fa9a075495eb5b115a722c5d7a46b2d5c5a0 70caf6f317b845757690c33fa4621758452fd86b

View File

@ -1 +1 @@
0a008b2c7a75809e566ef96fa411184427d72072 e024162eae00395b415cd344e804a4ac0a841e3a

View File

@ -1 +1 @@
89e45ec332a791625f1f00a79c83866a1f50581f 300722a98a05bc31dfb3f3fc97aaa86152d6626e

View File

@ -1 +1 @@
f3666c75cf299935ce7d98afad77e3fd806a5947 6ab34de67290bcc7a0088ecd8c8317e457e9bb61

View File

@ -1 +1 @@
4e8b22d47d41d3c26b20e098509be714c9b8f20c a6e3dd850207b906f007f26645603201afe2cfc8

View File

@ -1 +1 @@
79c868774947b3efa0ece81712bb568df8b4927c a1eaa2f68f534f2c4b2ee4b1f772f15b1b67bdcc

View File

@ -1 +1 @@
74f03df4b3bc6d6f248f883fc145547b03970ad9 32f2b24aaa0b03c517b78e71da24e365056ee71f

View File

@ -1 +1 @@
bf559e19a4204224fdaa8166a68a938e4e567afb 2c1857d6aec99e5872da9a31885a3e7ff8d06ced

View File

@ -1 +1 @@
9003fa9a075495eb5b115a722c5d7a46b2d5c5a0 70caf6f317b845757690c33fa4621758452fd86b

View File

@ -1 +1 @@
3b91c985795095a06678d9c9ad21b8afb0cdc4a2 f4f22c4d91fac636ef3fc03f2dd022850d2000fa

View File

@ -1 +1 @@
#define FULL_VERSION "explicit/b601371" #define FULL_VERSION "explicit/3eb5f34"

View File

@ -1496,10 +1496,10 @@ distclean-generic:
maintainer-clean-generic: maintainer-clean-generic:
@echo "This command is intended for maintainers to use" @echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild." @echo "it deletes files that may require special tools to rebuild."
@CROSS_COMPILE_TRUE@clean-local:
@HOST_WIN32_TRUE@clean-local:
@CROSS_COMPILE_TRUE@test-local: @CROSS_COMPILE_TRUE@test-local:
@HOST_WIN32_TRUE@test-local: @HOST_WIN32_TRUE@test-local:
@CROSS_COMPILE_TRUE@clean-local:
@HOST_WIN32_TRUE@clean-local:
clean: clean-am clean: clean-am
clean-am: clean-checkPROGRAMS clean-generic clean-libtool clean-local \ clean-am: clean-checkPROGRAMS clean-generic clean-libtool clean-local \

View File

@ -525,8 +525,8 @@ distclean-generic:
maintainer-clean-generic: maintainer-clean-generic:
@echo "This command is intended for maintainers to use" @echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild." @echo "it deletes files that may require special tools to rebuild."
@ENABLE_MSVC_FALSE@install-exec-local:
@ENABLE_MSVC_FALSE@clean-local: @ENABLE_MSVC_FALSE@clean-local:
@ENABLE_MSVC_FALSE@install-exec-local:
clean: clean-am clean: clean-am
clean-am: clean-generic clean-libtool clean-local mostlyclean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am

Binary file not shown.

View File

@ -1 +1 @@
5ee064b61c174eddde00c8f73aebe35143aeba22 cd2ee4f457d612eef9e14287cac43ba7089669f2

Binary file not shown.

View File

@ -1 +1 @@
40d70447f011cb4cfb0e1748763c48ca4d568f46 4d3a86a1e872b378c8910c237e0dd4a3c37bfb25

Binary file not shown.

View File

@ -1 +1 @@
681908bd2a42f011b44bf15e296812501ea5179f edda0118e4f4d795d59607753344f59a48c2f708

View File

@ -6,9 +6,9 @@
#, fuzzy #, fuzzy
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: mono 6.6.0.128\n" "Project-Id-Version: mono 6.6.0.129\n"
"Report-Msgid-Bugs-To: http://www.mono-project.com/Bugs\n" "Report-Msgid-Bugs-To: http://www.mono-project.com/Bugs\n"
"POT-Creation-Date: 2019-10-16 08:26+0000\n" "POT-Creation-Date: 2019-10-17 08:32+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"

Binary file not shown.

View File

@ -1 +1 @@
7bd7d5c9851f157ffcf3dcf765e9755fe52f8575 07afc155f6e9ad9a685a188a70238ca92c219768