Accepting request 318104 from GNOME:Factory

1

OBS-URL: https://build.opensuse.org/request/show/318104
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gtk3?expand=0&rev=82
This commit is contained in:
Stephan Kulow 2015-07-24 07:58:08 +00:00 committed by Git OBS Bridge
commit 0e48a573f8
5 changed files with 18 additions and 165 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b87c99d127eb962fc857c246b77a65322cdffd7dcbcf46a83bce2040e0f4bc31
size 18263356

3
gtk+-3.16.6.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4d12726d0856a968b41802ae5c5971d7e9bac532717e309d3f81b9989da5ffbe
size 18273872

View File

@ -1,157 +0,0 @@
From 72bfb40ccf746f743d9818f9dbecf2820f4557ba Mon Sep 17 00:00:00 2001
From: Carlos Garnacho <carlosg@gnome.org>
Date: Wed, 15 Jul 2015 21:19:25 +0200
Subject: Revert "x11: Query pointer devices' scroll valuators on toplevel
enter events"
This reverts commit 77b8495bc4e51826afa451914d6a3b0df1b62a24.
The commit broke more scenarios than fixed, better to go back to square one.
diff --git a/gdk/x11/gdkdevice-xi2.c b/gdk/x11/gdkdevice-xi2.c
index 280eb0d..515840b 100644
--- a/gdk/x11/gdkdevice-xi2.c
+++ b/gdk/x11/gdkdevice-xi2.c
@@ -40,6 +40,7 @@ struct _ScrollValuator
{
guint n_valuator : 4;
guint direction : 4;
+ guint last_value_valid : 1;
gdouble last_value;
gdouble increment;
};
@@ -818,8 +819,8 @@ _gdk_x11_device_xi2_add_scroll_valuator (GdkX11DeviceXI2 *device,
scroll.n_valuator = n_valuator;
scroll.direction = direction;
+ scroll.last_value_valid = FALSE;
scroll.increment = increment;
- scroll.last_value = 0;
g_array_append_val (device->scroll_valuators, scroll);
}
@@ -850,10 +851,18 @@ _gdk_x11_device_xi2_get_scroll_delta (GdkX11DeviceXI2 *device,
if (delta_ret)
*delta_ret = 0;
- if (delta_ret)
- *delta_ret = (valuator_value - scroll->last_value) / scroll->increment;
+ if (scroll->last_value_valid)
+ {
+ if (delta_ret)
+ *delta_ret = (valuator_value - scroll->last_value) / scroll->increment;
- scroll->last_value = valuator_value;
+ scroll->last_value = valuator_value;
+ }
+ else
+ {
+ scroll->last_value = valuator_value;
+ scroll->last_value_valid = TRUE;
+ }
return TRUE;
}
@@ -863,33 +872,17 @@ _gdk_x11_device_xi2_get_scroll_delta (GdkX11DeviceXI2 *device,
}
void
-_gdk_device_xi2_revalidate_scroll_valuators (GdkX11DeviceXI2 *device)
+_gdk_device_xi2_reset_scroll_valuators (GdkX11DeviceXI2 *device)
{
- GdkDisplay *display;
- XIDeviceInfo *info;
- gint i, ndevices;
-
- display = gdk_device_get_display (GDK_DEVICE (device));
-
- gdk_x11_display_error_trap_push (display);
- info = XIQueryDevice (GDK_DISPLAY_XDISPLAY (display),
- device->device_id, &ndevices);
- gdk_x11_display_error_trap_pop_ignored (display);
-
- if (!info)
- return;
+ guint i;
for (i = 0; i < device->scroll_valuators->len; i++)
{
- XIValuatorClassInfo *valuator;
ScrollValuator *scroll;
scroll = &g_array_index (device->scroll_valuators, ScrollValuator, i);
- valuator = (XIValuatorClassInfo *) info->classes[scroll->n_valuator + 1];
- scroll->last_value = valuator->value;
+ scroll->last_value_valid = FALSE;
}
-
- XIFreeDeviceInfo (info);
}
void
diff --git a/gdk/x11/gdkdevicemanager-xi2.c b/gdk/x11/gdkdevicemanager-xi2.c
index 5d374a2..e63c35b 100644
--- a/gdk/x11/gdkdevicemanager-xi2.c
+++ b/gdk/x11/gdkdevicemanager-xi2.c
@@ -824,11 +824,13 @@ handle_device_changed (GdkX11DeviceManagerXI2 *device_manager,
XIDeviceChangedEvent *ev)
{
GdkDisplay *display;
- GdkDevice *device;
+ GdkDevice *device, *source_device;
display = gdk_device_manager_get_display (GDK_DEVICE_MANAGER (device_manager));
device = g_hash_table_lookup (device_manager->id_table,
GUINT_TO_POINTER (ev->deviceid));
+ source_device = g_hash_table_lookup (device_manager->id_table,
+ GUINT_TO_POINTER (ev->sourceid));
if (device)
{
@@ -839,6 +841,9 @@ handle_device_changed (GdkX11DeviceManagerXI2 *device_manager,
g_signal_emit_by_name (G_OBJECT (device), "changed");
}
+
+ if (source_device)
+ _gdk_device_xi2_reset_scroll_valuators (GDK_X11_DEVICE_XI2 (source_device));
}
static GdkCrossingMode
@@ -1678,16 +1683,16 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
xev->detail != XINotifyInferior && xev->mode != XINotifyPassiveUngrab &&
gdk_window_get_window_type (window) == GDK_WINDOW_TOPLEVEL)
{
- if (gdk_device_get_device_type (device) != GDK_DEVICE_TYPE_MASTER)
- _gdk_device_xi2_revalidate_scroll_valuators (GDK_X11_DEVICE_XI2 (source_device));
+ if (gdk_device_get_device_type (source_device) != GDK_DEVICE_TYPE_MASTER)
+ _gdk_device_xi2_reset_scroll_valuators (GDK_X11_DEVICE_XI2 (source_device));
else
{
GList *slaves, *l;
- slaves = gdk_device_list_slave_devices (device);
+ slaves = gdk_device_list_slave_devices (source_device);
for (l = slaves; l; l = l->next)
- _gdk_device_xi2_revalidate_scroll_valuators (l->data);
+ _gdk_device_xi2_reset_scroll_valuators (GDK_X11_DEVICE_XI2 (l->data));
g_list_free (slaves);
}
diff --git a/gdk/x11/gdkprivate-x11.h b/gdk/x11/gdkprivate-x11.h
index 459b76e..c2afecf 100644
--- a/gdk/x11/gdkprivate-x11.h
+++ b/gdk/x11/gdkprivate-x11.h
@@ -246,8 +246,6 @@ gboolean _gdk_x11_device_xi2_get_scroll_delta (GdkX11DeviceXI2 *device,
GdkScrollDirection *direction_ret,
gdouble *delta_ret);
void _gdk_device_xi2_reset_scroll_valuators (GdkX11DeviceXI2 *device);
-void _gdk_device_xi2_revalidate_scroll_valuators (GdkX11DeviceXI2 *device);
-
gdouble gdk_x11_device_xi2_get_last_axis_value (GdkX11DeviceXI2 *device,
gint n_axis);
--
cgit v0.10.2

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Tue Jul 21 19:54:46 UTC 2015 - zaitor@opensuse.org
- Update to version 3.16.6:
+ OS X: Partial aspect ratio support.
+ Revert a problematic change to scroll event handling.
+ Bugs fixed: bgo#741800, bgo#751401, bgo#751625, bgo#752016,
bgo#752093, bgo#752520.
+ Updated translations.
- Drop
gtk3-Revert-x11-Query-pointer-devices-scroll-valuators.patch:
Fixed upstream.
-------------------------------------------------------------------
Wed Jul 15 20:06:01 UTC 2015 - zaitor@opensuse.org

View File

@ -29,7 +29,7 @@
Name: gtk3
%define _name gtk+
Version: 3.16.5
Version: 3.16.6
Release: 0
Summary: The GTK+ toolkit library (version 3)
License: LGPL-2.1+
@ -47,12 +47,10 @@ Patch1: gtk3-path-local.patch
## PATCH-DISABLED gtk3-bnc130159-bgo319483-async-font-selection.patch - Upstream bug was closed as obsolete in 2011, lets see if anyone complains.
# PATCH-FIX-UPSTREAM gtk3-bnc130159-bgo319483-async-font-selection.patch bnc130159 bgo319483 federico@novell.com - Load fonts asynchronously in GtkFontSelection to make it appear faster for CJK languages
Patch3: gtk3-bnc130159-bgo319483-async-font-selection.patch
# PATCH-FIX-UPSTREAM gtk3-Revert-x11-Query-pointer-devices-scroll-valuators.patch bgo#752184 zaitor@opensuse.org -- Revert a commit that makes hardware mice scrollwheel jumpy.
Patch4: gtk3-Revert-x11-Query-pointer-devices-scroll-valuators.patch
BuildRequires: cups-devel >= 1.2
BuildRequires: docbook-xsl-stylesheets
BuildRequires: fdupes
# Needed for patch1 and patch4
# Needed for patch1
BuildRequires: gettext-tools
BuildRequires: gnome-common
BuildRequires: hicolor-icon-theme
@ -340,7 +338,6 @@ cp -a %{S:1} .
%patch1 -p0
## PATCH-DISABLED - Upstream bug was closed as obsolete in 2011, as there was a new fontchooser, lets disable the patch and see if anyone complains.
#%%patch3 -p1
%patch4 -p1
%build
# Needed for patch1 and patch4