The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Hide cursor

These changes was commited to the Birdfont repository Fri, 24 Apr 2015 17:37:14 +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>
Fri, 24 Apr 2015 17:37:14 +0000 (19:37 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Fri, 24 Apr 2015 17:37:14 +0000 (19:37 +0200)
commit d214a9d80c32b337d8be12a49754ea97c19f4def
tree 2caba6c65602ab123e731ec05c05ae7525db4378
parent 90f4bf41d007294d08941943307a7cb54adfe543
Hide cursor

libbirdfont/NativeWindow.vala
libbirdfont/PenTool.vala
--- a/libbirdfont/NativeWindow.vala +++ b/libbirdfont/NativeWindow.vala @@ -15,6 +15,10 @@ namespace BirdFont { public interface NativeWindow : GLib.Object { + + public static const int HIDDEN = 0; + public static const int VISIBLE = 1; + public abstract void file_chooser (string title, FileChooser file_chooser_callback, uint flags); public abstract void update_window_size (); @@ -65,8 +69,8 @@ public abstract bool can_export (); /** Set cursor visibility */ - public abstract bool set_cursor (bool visible); + public abstract bool set_cursor (int visible); } }
--- a/libbirdfont/PenTool.vala +++ b/libbirdfont/PenTool.vala @@ -175,6 +175,8 @@ update_selection (); } } + + MainWindow.native_window.set_cursor (NativeWindow.VISIBLE); point_selection_image = false; BirdFont.get_current_font ().touch (); @@ -556,11 +558,11 @@ move_selected = false; move_selected_handle = false; } - + if (move_selected_handle || move_selected) { - MainWindow.native_window.set_cursor (false); + MainWindow.native_window.set_cursor (NativeWindow.HIDDEN); } else { - MainWindow.native_window.set_cursor (true); + MainWindow.native_window.set_cursor (NativeWindow.VISIBLE); } // move control point handles