[gnome-builder/wip/libide] libide: cancel macro if suppressing unbound input
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/libide] libide: cancel macro if suppressing unbound input
- Date: Thu, 12 Mar 2015 10:29:26 +0000 (UTC)
commit 27f0dc92655a87383afee414e409ab706a6ff9ff
Author: Christian Hergert <christian hergert me>
Date: Thu Mar 12 03:29:11 2015 -0700
libide: cancel macro if suppressing unbound input
We could get into a weird state if we suppress input while a macro is
recording (since it wont get stopped). This kills it when supressing
the input.
libide/ide-source-view-mode.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/libide/ide-source-view-mode.c b/libide/ide-source-view-mode.c
index 1ede67f..c73bfb5 100644
--- a/libide/ide-source-view-mode.c
+++ b/libide/ide-source-view-mode.c
@@ -426,8 +426,12 @@ _ide_source_view_mode_do_event (IdeSourceViewMode *mode,
case IDE_SOURCE_VIEW_MODE_TYPE_PERMANENT:
{
/* don't block possible accelerators, but supress others */
- if (suppress_unbound && ((event->state & GDK_MODIFIER_MASK) == 0))
- handled = TRUE;
+ if (!handled && suppress_unbound && ((event->state & GDK_MODIFIER_MASK) == 0))
+ {
+ /* cancel any inflight macros */
+ g_signal_emit_by_name (priv->view, "end-macro");
+ handled = TRUE;
+ }
}
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]