Should GtkWidget::draw be RUN_LAST?
- From: Owen Taylor <otaylor redhat com>
- To: gtk-devel-list redhat com
- Subject: Should GtkWidget::draw be RUN_LAST?
- Date: 24 Jan 1999 23:25:33 -0500
Two separate questions - should GtkWidget::draw be RUN_LAST,
and can we change it to that at this point.
1) The reason I believe that it should be RUN_LAST is one
of layering. When drawing an app_paintable container
widget, such as a Window or GtkLayout, the contents
of the widget need to be painted before NO_WINDOW
child widgets.
Since the widget's default ::draw handler paints the child
widgets, if the application is painting the contents of the
widget, it needs to paint them before the ::draw handler.
This is impossible if ::draw is RUN_FIRST.
2) Can we change it at this point? This only matters if
people are connecting to ::draw. I cannot find any
such connections in GNOME or GIMP - which represent
a large fraction of GTK+ code out there, and probably
include most of the more "tricky" GTK+ code as well.
In addition, connecting to draw and then drawing on
top of the widgets contents is unsupported behavior
in any case, so if there if there is some app that
does that, it probably deserves what it gets.
So I think there shouldn't be any problem in going ahead
and making this change. The other alternative I could
do with respect to the GtkLayout widget (where this really
matters), is to create a separate "paint" signal that
"draw" calls. But since it isn't really a GtkLayout-specific
problem, this feels a bit unclean to me.
(Having a real virtualized paint method be used throughout
GTK+ would be big improvement actually, and has been
discussed for a long time. But that certainly isn't a
pre-1.2 change)
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]