gtk+ r22420 - in trunk: . gdk gtk
- From: matthiasc svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk+ r22420 - in trunk: . gdk gtk
- Date: Sat, 28 Feb 2009 05:24:08 +0000 (UTC)
Author: matthiasc
Date: Sat Feb 28 05:24:07 2009
New Revision: 22420
URL: http://svn.gnome.org/viewvc/gtk+?rev=22420&view=rev
Log:
Bug 573069 â Gdk-CRITICAL warnings with Gtk 2.14 when dragging
GtkNotebook tabs
* gtk/gtkwidget.c (_gtk_widget_synthesize_crossing): Be a little
more careful when navigating up the parent chain.
* gdk/gdkwindow.c (_gdk_window_destroy_hierarchy): Reset the
pointer window thats stored on the screen when it is destroyed.
Modified:
trunk/ChangeLog
trunk/gdk/gdkwindow.c
trunk/gtk/gtkwidget.c
Modified: trunk/gdk/gdkwindow.c
==============================================================================
--- trunk/gdk/gdkwindow.c (original)
+++ trunk/gdk/gdkwindow.c Sat Feb 28 05:24:07 2009
@@ -283,6 +283,8 @@
window->state = GDK_WINDOW_STATE_WITHDRAWN;
}
+static GQuark quark_pointer_window = 0;
+
static void
gdk_window_class_init (GdkWindowObjectClass *klass)
{
@@ -319,6 +321,8 @@
drawable_class->get_clip_region = gdk_window_get_clip_region;
drawable_class->get_visible_region = gdk_window_get_visible_region;
drawable_class->get_composite_drawable = gdk_window_get_composite_drawable;
+
+ quark_pointer_window = g_quark_from_static_string ("gtk-pointer-window");
}
static void
@@ -490,10 +494,14 @@
if (GDK_WINDOW_DESTROYED (window))
return;
+ screen = gdk_drawable_get_screen (GDK_DRAWABLE (window));
+ temp_window = g_object_get_qdata (G_OBJECT (screen), quark_pointer_window);
+ if (temp_window == window)
+ g_object_set_qdata (G_OBJECT (screen), quark_pointer_window, NULL);
+
switch (GDK_WINDOW_TYPE (window))
{
case GDK_WINDOW_ROOT:
- screen = gdk_drawable_get_screen (GDK_DRAWABLE (window));
if (!screen->closed)
{
g_error ("attempted to destroy root window");
@@ -2108,17 +2116,16 @@
if (GDK_WINDOW_DESTROYED (window))
return;
- paint.x_offset = x_offset;
- paint.y_offset = y_offset;
- paint.pixmap = redirect->pixmap;
- paint.surface = _gdk_drawable_ref_cairo_surface (redirect->pixmap);
-
clip_region = _gdk_window_calculate_full_clip_region (window,
GDK_WINDOW (redirect->redirected),
NULL, TRUE,
&x_offset, &y_offset);
-
+ paint.x_offset = x_offset;
+ paint.y_offset = y_offset;
+ paint.pixmap = redirect->pixmap;
+ paint.surface = _gdk_drawable_ref_cairo_surface (redirect->pixmap);
+
method.cr = NULL;
method.gc = NULL;
setup_backing_rect_method (&method, window, &paint, 0, 0);
Modified: trunk/gtk/gtkwidget.c
==============================================================================
--- trunk/gtk/gtkwidget.c (original)
+++ trunk/gtk/gtkwidget.c Sat Feb 28 05:24:07 2009
@@ -8246,13 +8246,10 @@
while (from_ancestor != NULL)
{
- if (from_ancestor != NULL)
- {
- from_ancestor = gdk_window_get_parent (from_ancestor);
- if (from_ancestor == NULL)
- break;
- from_ancestors = g_list_prepend (from_ancestors, from_ancestor);
- }
+ from_ancestor = gdk_window_get_parent (from_ancestor);
+ if (from_ancestor == NULL)
+ break;
+ from_ancestors = g_list_prepend (from_ancestors, from_ancestor);
}
synth_crossing (from, GDK_LEAVE_NOTIFY, from_window,
@@ -8274,14 +8271,11 @@
while (to_ancestor != NULL)
{
- if (to_ancestor != NULL)
- {
- to_ancestor = gdk_window_get_parent (to_ancestor);
- if (to_ancestor == NULL)
- break;
- to_ancestors = g_list_prepend (to_ancestors, to_ancestor);
- }
- }
+ to_ancestor = gdk_window_get_parent (to_ancestor);
+ if (to_ancestor == NULL)
+ break;
+ to_ancestors = g_list_prepend (to_ancestors, to_ancestor);
+ }
/* XXX: leave/inferior on root window? */
@@ -8309,14 +8303,16 @@
from_ancestor = gdk_window_get_parent (from_ancestor);
if (from_ancestor == to_window)
break;
- from_ancestors = g_list_prepend (from_ancestors, from_ancestor);
+ if (from_ancestor)
+ from_ancestors = g_list_prepend (from_ancestors, from_ancestor);
}
if (to_ancestor != NULL)
{
to_ancestor = gdk_window_get_parent (to_ancestor);
if (to_ancestor == from_window)
break;
- to_ancestors = g_list_prepend (to_ancestors, to_ancestor);
+ if (to_ancestor)
+ to_ancestors = g_list_prepend (to_ancestors, to_ancestor);
}
}
if (to_ancestor == from_window)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]