After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 81156 - Don't invalidate invisible widgets
Don't invalidate invisible widgets
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
2.0.x
Other other
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2002-05-08 14:46 UTC by Soren Sandmann Pedersen
Modified: 2011-02-04 16:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (1.14 KB, patch)
2002-05-08 14:46 UTC, Soren Sandmann Pedersen
none Details | Review
The new patch (818 bytes, patch)
2002-10-13 13:33 UTC, Soren Sandmann Pedersen
none Details | Review

Description Soren Sandmann Pedersen 2002-05-08 14:46:14 UTC
A small patch that makes gtk_widget_queue_clear_area() return if the widget
is not visible.  (Range widgets invalidates themselves on
adjustment_changed even when they are hidden).
Comment 1 Soren Sandmann Pedersen 2002-05-08 14:46:58 UTC
Created attachment 8288 [details] [review]
patch
Comment 2 Owen Taylor 2002-10-04 19:08:46 UTC
I think if we are going to do this, we probably should do
the full check for the widget and all its parents being 
GTK_WIDGET_MAPPED - otherwise there are still cases where
we'll invalidate unnecessary when a NO_WINDOW widget is
a child of a not-visible NO_WINDOW widget.

(If we did that, could we get rid of the gdk_window_is_viewable()
check? I can't think of any cases in GTK+ where a widget
gdk_window_hide()'s the parent window of a child widget without 
gtk_widget_unmapping the window, so I think we can safely
remove it and avoid an extra walk up the widget heirarchy, though
it is certainly possible for it to catch something that
you woudln't catch by checking GTK_WIDGET_MAPPED())


Comment 3 Soren Sandmann Pedersen 2002-10-13 13:32:28 UTC
Right, it should definitely be safe to omit the call since the worst
thing that can happen is an unnecessary invalidation. If we find out
that there widgets that does this, then we can add the check again.

Here is a new patch that checks that all ancestors are mapped and
removes the viewable check.
Comment 4 Soren Sandmann Pedersen 2002-10-13 13:33:17 UTC
Created attachment 11521 [details] [review]
The new patch
Comment 5 Owen Taylor 2002-10-13 15:32:36 UTC
Looks fine to commit to me (HEAD branch only).
Comment 6 Soren Sandmann Pedersen 2002-10-13 15:42:16 UTC
Sun Oct 13 17:41:53 2002  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtkwidget.c (gtk_widget_queue_clear_area): Don't invalidate
	a widget if it or one of its ancestors isn't mapped.