* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
/*
window = gdk_window_new (gtk_widget_get_parent_window (widget),
&attributes, attributes_mask);
gtk_widget_set_window (widget, window);
- gdk_window_set_user_data (window, widget);
+ gtk_widget_register_window (widget, window);
}
else
{
priv->event_window = gdk_window_new (window,
&attributes, attributes_mask);
- gdk_window_set_user_data (priv->event_window, widget);
+ gtk_widget_register_window (widget, priv->event_window);
}
if (visible_window)
if (priv->event_window != NULL)
{
- gdk_window_set_user_data (priv->event_window, NULL);
+ gtk_widget_unregister_window (widget, priv->event_window);
gdk_window_destroy (priv->event_window);
priv->event_window = NULL;
}
context = gtk_widget_get_style_context (widget);
- gtk_style_context_save (context);
- gtk_style_context_set_state (context, gtk_widget_get_state_flags (widget));
gtk_render_background (context, cr, 0, 0,
gtk_widget_get_allocated_width (widget),
gtk_widget_get_allocated_height (widget));
- gtk_style_context_restore (context);
}
GTK_WIDGET_CLASS (gtk_event_box_parent_class)->draw (widget, cr);