The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Stop moving canvas when window loses focus

These changes was commited to the Birdfont repository Tue, 28 Apr 2015 06:47:45 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
author Johan Mattsson <johan.mattsson.m@gmail.com>
Tue, 28 Apr 2015 06:47:45 +0000 (08:47 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Tue, 28 Apr 2015 06:47:45 +0000 (08:47 +0200)
commit 196e9a32f047e197e979ade054aeb3c6907705ff
tree 19a14d46f3406f480821b32b7b74d1f9ca34dadd
parent d03d2eb8a0fc65525558a07a36ce475fa6d6d371
Stop moving canvas when window loses focus

birdfont/GtkWindow.vala
libbirdfont/TabContent.vala
--- a/birdfont/GtkWindow.vala +++ b/birdfont/GtkWindow.vala @@ -212,7 +212,7 @@ } public void window_focus (void* data) { - TabContent.key_release ((uint) ' '); + TabContent.reset_modifier (); } public static void reset_modifier (ModifierType flags) {
--- a/libbirdfont/TabContent.vala +++ b/libbirdfont/TabContent.vala @@ -351,8 +351,23 @@ public static void hide_text_input () { text_input_visible = false; text_callback = new TextListener ("", "", ""); + } + + public static void reset_modifier () { + TabContent.key_release (Key.CTRL_RIGHT); + TabContent.key_release (Key.CTRL_LEFT); + TabContent.key_release (Key.SHIFT_LEFT); + TabContent.key_release (Key.SHIFT_RIGHT); + TabContent.key_release (Key.ALT_LEFT); + TabContent.key_release (Key.ALT_RIGHT); + TabContent.key_release (Key.LOGO_LEFT); + TabContent.key_release (Key.LOGO_RIGHT); + + if (MainWindow.get_current_display () is Glyph) { + TabContent.key_release ((uint) ' '); + } } } }