From 8456654633ff2fd8013a60891548ace4390da408 Mon Sep 17 00:00:00 2001 From: Pierre-Luc Beaudoin Date: Mon, 27 Jul 2009 20:37:33 -0400 Subject: [PATCH] Eat selection events This prevents unreactive (by user) markers to pass the click event to the stage to unselect all markers. --- champlain/champlain-selection-layer.c | 2 +- champlain/champlain-view.c | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/champlain/champlain-selection-layer.c b/champlain/champlain-selection-layer.c index c2e7cc1..4a4ac79 100644 --- a/champlain/champlain-selection-layer.c +++ b/champlain/champlain-selection-layer.c @@ -169,7 +169,7 @@ marker_clicked_cb (ClutterActor *actor, real_select (CHAMPLAIN_SELECTION_LAYER (user_data), CHAMPLAIN_BASE_MARKER (actor), (event->modifier_state & CLUTTER_CONTROL_MASK)); - return FALSE; + return TRUE; } static void diff --git a/champlain/champlain-view.c b/champlain/champlain-view.c index e168df6..75fcda3 100644 --- a/champlain/champlain-view.c +++ b/champlain/champlain-view.c @@ -938,18 +938,22 @@ button_release_cb (ClutterActor *actor, ChamplainView *view) { GList *children = NULL; + gboolean found = FALSE; ChamplainViewPrivate *priv = view->priv; children = clutter_container_get_children (CLUTTER_CONTAINER (priv->user_layers)); for (;children != NULL; children = g_list_next (children)) { if (CHAMPLAIN_IS_SELECTION_LAYER (children->data)) - champlain_selection_layer_unselect_all (CHAMPLAIN_SELECTION_LAYER (children->data)); + { + champlain_selection_layer_unselect_all (CHAMPLAIN_SELECTION_LAYER (children->data)); + found = TRUE; + } } g_list_free (children); - return FALSE; + return found; } -- 2.39.5