[gtk+] Remove some redundant code
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Remove some redundant code
- Date: Fri, 26 Sep 2014 13:50:51 +0000 (UTC)
commit 3214122fbde38c3e026f4461ea8fd2cdaa4a4402
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Sep 26 09:40:30 2014 -0400
Remove some redundant code
No need to check the same widget twice in a row for being a window.
gtk/gtkmain.c | 12 +++---------
1 files changed, 3 insertions(+), 9 deletions(-)
---
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index 1fa3cf0..d8c344f 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -2502,15 +2502,9 @@ propagate_event (GtkWidget *widget,
if (widget != window && gtk_widget_has_grab (widget))
handled_event = propagate_func (widget, event);
- if (!handled_event)
- {
- window = gtk_widget_get_toplevel (widget);
- if (GTK_IS_WINDOW (window))
- {
- if (gtk_widget_is_sensitive (window))
- handled_event = propagate_func (window, event);
- }
- }
+ if (!handled_event &&
+ gtk_widget_is_sensitive (window))
+ handled_event = propagate_func (window, event);
g_object_unref (widget);
return handled_event;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]