Commit 7dfe5bec authored by Tristan Van Berkom's avatar Tristan Van Berkom
Browse files

* gladeui/glade-widget.c: Reduce processing of events by not running the

	  widget lookup event redirection for events we're not interested in.
parent 7fcb740b
......@@ -9,6 +9,9 @@
* src/glade-close-button.c: Made the close button in notebook tabs smaller.
* gladeui/glade-widget.c: Reduce processing of events by not running the
widget lookup event redirection for events we're not interested in.
2010-12-23 Tristan Van Berkom <tristanvb@openismus.com>
* gladeui/glade-widget.c: Check if object is actually in the parent when rebuilding
......
......@@ -103,6 +103,11 @@ static guint glade_widget_signals[LAST_SIGNAL] = {0};
static GQuark glade_widget_name_quark = 0;
#define IS_GLADE_WIDGET_EVENT(event) \
((event) == GDK_BUTTON_PRESS || \
(event) == GDK_BUTTON_RELEASE || \
(event) == GDK_MOTION_NOTIFY)
G_DEFINE_TYPE (GladeWidget, glade_widget, G_TYPE_INITIALLY_UNOWNED)
/*******************************************************************************
......@@ -3281,6 +3286,11 @@ glade_widget_event_private (GtkWidget *widget,
{
GtkWidget *layout = widget;
/* Dont run heavy machienery for events we're not interested in
* marshalling */
if (!IS_GLADE_WIDGET_EVENT (event->type))
return FALSE;
/* Find the parenting layout container */
while (layout && !GLADE_IS_DESIGN_LAYOUT (layout))
layout = gtk_widget_get_parent (layout);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment