From 758260fcc5c15e08b9bf82ba9b00c9268d805ec2 Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Fri, 11 Dec 1998 17:49:09 +0000 Subject: [PATCH] 1998-12-11 Owen Taylor * gdesktop.c (window_button_press): Ehen cancelling editing account for clicks on other GMC windows. --- gnome/ChangeLog | 6 ++++++ gnome/gdesktop.c | 17 ++++++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/gnome/ChangeLog b/gnome/ChangeLog index 31da2af8e..514b1554c 100644 --- a/gnome/ChangeLog +++ b/gnome/ChangeLog @@ -1,3 +1,8 @@ +1998-12-11 Owen Taylor + + * gdesktop.c (window_button_press): Ehen cancelling editing + account for clicks on other GMC windows. + 1998-12-11 Federico Mena Quintero * gdesktop.c (click_proxy_filter): Doh. We may get DestroyNotify @@ -46,6 +51,7 @@ * gdesktop-icon.c (desktop_icon_reshape): Set the position and size fields as computed for layout. +>>>>>>> 1.192 1998-12-11 Owen Taylor * gdesktop.c (editing_started): Grab on the window for the diff --git a/gnome/gdesktop.c b/gnome/gdesktop.c index 6eb0e2514..96042a799 100644 --- a/gnome/gdesktop.c +++ b/gnome/gdesktop.c @@ -693,13 +693,24 @@ static gint window_button_press (GtkWidget *widget, GdkEventButton *event, gpointer data) { struct desktop_icon_info *dii; + GtkWidget *parent; dii = data; - /* We should only get this while editing. But check anyways */ + /* We should only get this while editing. But check anyways - + * we ignore events in a child of our a event widget + */ + parent = gtk_get_event_widget ((GdkEvent *)event); + if (parent) + parent = parent->parent; - if ((event->window == widget->window) && - GNOME_ICON_TEXT_ITEM (DESKTOP_ICON (dii->dicon)->text)->editing) { + while (parent) { + if (widget == parent) + return FALSE; + parent = parent->parent; + } + + if (GNOME_ICON_TEXT_ITEM (DESKTOP_ICON (dii->dicon)->text)->editing) { gnome_icon_text_item_stop_editing ( GNOME_ICON_TEXT_ITEM ( DESKTOP_ICON (dii->dicon)->text), TRUE);