rpms/gtk2/F-12 0001-Track-direct-window-cairo-access-and-avoid-tricks-wh.patch, NONE, 1.1 0002-Move-common-gdkwindow.c-code-into-function-gdk_windo.patch, NONE, 1.1 0003-Drop-outstanding-cairo-surfaces-when-window-is-made-.patch, NONE, 1.1 0004-When-native-window-requests-button-presses-request-o.patch, NONE, 1.1 gtk2.spec, 1.446, 1.447 gtk+-2.13.5-lib64.patch, 1.1, NONE stackoverflow.patch, 1.1, NONE
Matthias Clasen
mclasen at fedoraproject.org
Wed Jan 20 18:23:38 UTC 2010
Author: mclasen
Update of /cvs/pkgs/rpms/gtk2/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv1072
Modified Files:
gtk2.spec
Added Files:
0001-Track-direct-window-cairo-access-and-avoid-tricks-wh.patch
0002-Move-common-gdkwindow.c-code-into-function-gdk_windo.patch
0003-Drop-outstanding-cairo-surfaces-when-window-is-made-.patch
0004-When-native-window-requests-button-presses-request-o.patch
Removed Files:
gtk+-2.13.5-lib64.patch stackoverflow.patch
Log Message:
Add more CSW regression fixes
0001-Track-direct-window-cairo-access-and-avoid-tricks-wh.patch:
gdkinternals.h | 1 +
gdkwindow.c | 10 +++++++---
2 files changed, 8 insertions(+), 3 deletions(-)
--- NEW FILE 0001-Track-direct-window-cairo-access-and-avoid-tricks-wh.patch ---
>From ed7db8ea55df8a2d7aaf006c2770e0f8966f84e6 Mon Sep 17 00:00:00 2001
From: Alexander Larsson <alexl at redhat.com>
Date: Tue, 19 Jan 2010 14:44:52 +0100
Subject: [PATCH 1/4] Track direct window cairo access and avoid tricks when used
When a cairo surface is requested for direct window access (i.e. not
when double-buffering) we can't really track when the actual drawing happens
as cairo drawing is not virtualized. This means we can't properly flush
any outstanding window moves or implicit paints.
This actually causes problems with e.g. abiword (bug #606009) where they
draw without double-buffering. If you press down it scrolls the window
and then draws the caret, but the caret drawing does not flush the
outstanding move from the scroll, so the caret gets drawn on the wrong
screen.
We fix this by never allowing either implicit paints or outstanding window
moves on impl-windows where any windows related to it has an outstanding
direct cairo surface. Luckily this is not very common so in practice this
doesn't matter much.
(cherry picked from commit 841fa4771505b6810da341ea379d5f56af7ef1d1)
---
gdk/gdkinternals.h | 1 +
gdk/gdkwindow.c | 9 +++++++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/gdk/gdkinternals.h b/gdk/gdkinternals.h
index 0681bdc..822335f 100644
--- a/gdk/gdkinternals.h
+++ b/gdk/gdkinternals.h
@@ -273,6 +273,7 @@ struct _GdkWindowObject
GdkRegion *input_shape;
cairo_surface_t *cairo_surface;
+ guint outstanding_surfaces; /* only set on impl window */
};
#define GDK_WINDOW_TYPE(d) (((GdkWindowObject*)(GDK_WINDOW (d)))->window_type)
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 612f5ac..11c3e3f 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -2611,6 +2611,9 @@ gdk_window_begin_implicit_paint (GdkWindow *window, GdkRectangle *rect)
private->implicit_paint != NULL)
return FALSE; /* Don't stack implicit paints */
+ if (private->outstanding_surfaces != 0)
+ return FALSE; /* May conflict with direct drawing to cairo surface */
+
/* Never do implicit paints for foreign windows, they don't need
* double buffer combination since they have no client side children,
* and creating pixmaps for them is risky since they could disappear
@@ -3316,7 +3319,7 @@ move_region_on_impl (GdkWindowObject *impl_window,
gdk_region_destroy (exposing);
}
- if (1) /* Enable flicker free handling of moves. */
+ if (impl_window->outstanding_surfaces == 0) /* Enable flicker free handling of moves. */
append_move_region (impl_window, region, dx, dy);
else
do_move_region_bits_on_impl (impl_window,
@@ -4837,6 +4840,7 @@ gdk_window_cairo_surface_destroy (void *data)
GdkWindowObject *private = (GdkWindowObject*) data;
private->cairo_surface = NULL;
+ private->impl_window->outstanding_surfaces--;
}
static cairo_surface_t *
@@ -4880,11 +4884,12 @@ gdk_window_ref_cairo_surface (GdkDrawable *drawable)
source = _gdk_drawable_get_source_drawable (drawable);
- /* TODO: Avoid the typecheck crap by adding virtual call */
private->cairo_surface = _gdk_drawable_create_cairo_surface (source, width, height);
if (private->cairo_surface)
{
+ private->impl_window->outstanding_surfaces++;
+
cairo_surface_set_device_offset (private->cairo_surface,
private->abs_x,
private->abs_y);
--
1.6.6
0002-Move-common-gdkwindow.c-code-into-function-gdk_windo.patch:
gdkwindow.c | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
--- NEW FILE 0002-Move-common-gdkwindow.c-code-into-function-gdk_windo.patch ---
>From 1c5b9ffb2bb88864e9a6946c19904ee733b1c447 Mon Sep 17 00:00:00 2001
From: Alexander Larsson <alexl at redhat.com>
Date: Tue, 19 Jan 2010 16:36:49 +0100
Subject: [PATCH 2/4] Move common gdkwindow.c code into function gdk_window_drop_cairo_surface
This code is duplicated in several places, and more to come, so put
it all in one place.
(cherry picked from commit 46d25437a1f44f76ef37318ad8c70b6591932992)
---
gdk/gdkwindow.c | 31 ++++++++++++++++---------------
1 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 11c3e3f..746380c 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -276,6 +276,7 @@ static cairo_surface_t *gdk_window_ref_cairo_surface (GdkDrawable *drawable);
static cairo_surface_t *gdk_window_create_cairo_surface (GdkDrawable *drawable,
int width,
int height);
+static void gdk_window_drop_cairo_surface (GdkWindowObject *private);
static void gdk_window_set_cairo_clip (GdkDrawable *drawable,
cairo_t *cr);
@@ -1587,14 +1588,9 @@ gdk_window_reparent (GdkWindow *window,
if (is_parent_of (window, new_parent))
return;
- if (private->cairo_surface)
- {
- /* This might be wrong in the new parent, e.g. for non-native surfaces.
- To make sure we're ok, just wipe it. */
- cairo_surface_finish (private->cairo_surface);
- cairo_surface_set_user_data (private->cairo_surface, &gdk_window_cairo_key,
- NULL, NULL);
- }
+ /* This might be wrong in the new parent, e.g. for non-native surfaces.
+ To make sure we're ok, just wipe it. */
+ gdk_window_drop_cairo_surface (private);
impl_iface = GDK_WINDOW_IMPL_GET_IFACE (private->impl);
old_parent = private->parent;
@@ -2054,13 +2050,7 @@ _gdk_window_destroy_hierarchy (GdkWindow *window,
_gdk_window_clear_update_area (window);
- if (private->cairo_surface)
- {
- cairo_surface_finish (private->cairo_surface);
- cairo_surface_set_user_data (private->cairo_surface, &gdk_window_cairo_key,
- NULL, NULL);
- }
-
+ gdk_window_drop_cairo_surface (private);
impl_iface = GDK_WINDOW_IMPL_GET_IFACE (private->impl);
@@ -4835,6 +4825,17 @@ gdk_window_copy_to_image (GdkDrawable *drawable,
}
static void
+gdk_window_drop_cairo_surface (GdkWindowObject *private)
+{
+ if (private->cairo_surface)
+ {
+ cairo_surface_finish (private->cairo_surface);
+ cairo_surface_set_user_data (private->cairo_surface, &gdk_window_cairo_key,
+ NULL, NULL);
+ }
+}
+
+static void
gdk_window_cairo_surface_destroy (void *data)
{
GdkWindowObject *private = (GdkWindowObject*) data;
--
1.6.6
0003-Drop-outstanding-cairo-surfaces-when-window-is-made-.patch:
gdkwindow.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- NEW FILE 0003-Drop-outstanding-cairo-surfaces-when-window-is-made-.patch ---
>From 9967831b8d09df76aa6e79836d118d5f5797d39b Mon Sep 17 00:00:00 2001
From: Alexander Larsson <alexl at redhat.com>
Date: Tue, 19 Jan 2010 16:37:42 +0100
Subject: [PATCH 3/4] Drop outstanding cairo surfaces when window is made native
Any old cairo_surface referencing the old impl window will be wrong
when we make a window native, so drop it.
This fixes bug #599511
(cherry picked from commit e31a6d1fea3834b5d0831e6337e6ed0774189d47)
---
gdk/gdkwindow.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 746380c..25785c6 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -1842,6 +1842,8 @@ gdk_window_ensure_native (GdkWindow *window)
if (impl_window->input_window)
disabled_extension_events = temporary_disable_extension_events (private);
+ gdk_window_drop_cairo_surface (private);
+
screen = gdk_drawable_get_screen (window);
visual = gdk_drawable_get_visual (window);
--
1.6.6
0004-When-native-window-requests-button-presses-request-o.patch:
gdkwindow.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
--- NEW FILE 0004-When-native-window-requests-button-presses-request-o.patch ---
>From d86702621917fddc91c1403365de18b07e548f7f Mon Sep 17 00:00:00 2001
From: Alexander Larsson <alexl at redhat.com>
Date: Wed, 20 Jan 2010 15:37:16 +0100
Subject: [PATCH 4/4] When native window requests button presses request other button related events
We need to do this because otherwise the implicit button grab for this
(native) window will not deliver the button events not selected for
by this window. This is a problem because non-native child windows may
select using a wider event mask, and we can't emulate these events if we
don't get the native events.
Fixes bug #607508
(cherry picked from commit 3d9d002bed4ec90505a5a65665f5d6de36ad6f67)
---
gdk/gdkwindow.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 25785c6..4780db4 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -1206,8 +1206,15 @@ get_native_event_mask (GdkWindowObject *private)
* important thing, because in X only one client can do
* so, and we don't want to unexpectedly prevent another
* client from doing it.
+ *
+ * We also need to do the same if the app selects for button presses
+ * because then we will get implicit grabs for this window, and the
+ * event mask used for that grab is based on the rest of the mask
+ * for the window, but we might need more events than this window
+ * lists due to some non-native child window.
*/
- if (gdk_window_is_toplevel (private))
+ if (gdk_window_is_toplevel (private) ||
+ mask & GDK_BUTTON_PRESS_MASK)
mask |=
GDK_POINTER_MOTION_MASK |
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |
--
1.6.6
Index: gtk2.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gtk2/F-12/gtk2.spec,v
retrieving revision 1.446
retrieving revision 1.447
diff -u -p -r1.446 -r1.447
--- gtk2.spec 15 Jan 2010 16:50:25 -0000 1.446
+++ gtk2.spec 20 Jan 2010 18:23:38 -0000 1.447
@@ -17,7 +17,7 @@
Summary: The GIMP ToolKit (GTK+), a library for creating GUIs for X
Name: gtk2
Version: %{base_version}
-Release: 2%{?dist}
+Release: 3%{?dist}
License: LGPLv2+
Group: System Environment/Libraries
Source: http://download.gnome.org/sources/gtk+/2.18/gtk+-%{version}.tar.bz2
@@ -48,6 +48,11 @@ Patch15: filesystemref.patch
Patch16: o-minus.patch
Patch17: strftime-format.patch
Patch18: 0001-Avoid-drawing-implicit-paints-to-destroyed-windows.patch
+Patch19: 0001-Track-direct-window-cairo-access-and-avoid-tricks-wh.patch
+Patch20: 0002-Move-common-gdkwindow.c-code-into-function-gdk_windo.patch
+Patch21: 0003-Drop-outstanding-cairo-surfaces-when-window-is-made-.patch
+Patch22: 0004-When-native-window-requests-button-presses-request-o.patch
+
BuildRequires: atk-devel >= %{atk_version}
BuildRequires: pango-devel >= %{pango_version}
@@ -172,6 +177,10 @@ This package contains developer document
%patch16 -p1 -b .o-minus
%patch17 -p1 -b .strftime-format
%patch18 -p1 -b .panel-crash
+%patch19 -p1 -b .track-direct
+%patch20 -p1 -b .move-common
+%patch21 -p1 -b .drop-outstanding
+%patch22 -p1 -b .native-button-press
%build
%configure --with-xinput=xfree \
@@ -399,6 +408,9 @@ fi
%changelog
+* Wed Jan 20 2010 Matthias Clasen <mclasen at redhat.com> - 2.18.6-3
+- Fix more CSW regressions (gnome bz 606009, 599511, 607508)
+
* Fri Jan 15 2010 Matthias Clasen <mclasen at redhat.com> - 2.18.6-2
- Fix a CSW bug that leads to panel crashes
--- gtk+-2.13.5-lib64.patch DELETED ---
--- stackoverflow.patch DELETED ---
More information about the scm-commits
mailing list