[nautilus] icon-container: clear the drag state before popping up context menu
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] icon-container: clear the drag state before popping up context menu
- Date: Thu, 7 Apr 2011 20:34:11 +0000 (UTC)
commit 07a6fb24fda755288346f11afb670cb3c05028fe
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Thu Apr 7 16:31:59 2011 -0400
icon-container: clear the drag state before popping up context menu
Otherwise, a fake drag state will leak into the next motion-notify event
when the menu has been dismissed, causing a segfault.
https://bugzilla.gnome.org/show_bug.cgi?id=550253
libnautilus-private/nautilus-icon-container.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/libnautilus-private/nautilus-icon-container.c b/libnautilus-private/nautilus-icon-container.c
index 95dd520..b025e9c 100644
--- a/libnautilus-private/nautilus-icon-container.c
+++ b/libnautilus-private/nautilus-icon-container.c
@@ -5320,6 +5320,9 @@ handle_popups (NautilusIconContainer *container,
{
GdkEventButton button_event = { 0 };
+ /* ensure we clear the drag state before showing the menu */
+ clear_drag_state (container);
+
g_signal_emit_by_name (container, signal, &button_event);
return TRUE;
@@ -6318,6 +6321,8 @@ handle_icon_button_press (NautilusIconContainer *container,
}
if (event->button == CONTEXTUAL_MENU_BUTTON) {
+ clear_drag_state (container);
+
g_signal_emit (container,
signals[CONTEXT_CLICK_SELECTION], 0,
event);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]