mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-09-13 04:51:15 +00:00
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
This commit is contained in:
parent
d8b632765c
commit
07a6fb24fd
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue