The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Hide cursor in gtk window

These changes was commited to the Birdfont repository Fri, 24 Apr 2015 18:16:37 +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 18:16:37 +0000 (20:16 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Fri, 24 Apr 2015 18:16:59 +0000 (20:16 +0200)
commit 0e5dfcfb862c263779a4c383bc7ac16655c5c2e4
tree 520b628fb2d98dd2e960e4d2ea8d4d9d5ca3d8c1
parent d214a9d80c32b337d8be12a49754ea97c19f4def
Hide cursor in gtk window

birdfont/GtkWindow.vala
libbirdfont/NativeWindow.vala
--- a/birdfont/GtkWindow.vala +++ b/birdfont/GtkWindow.vala @@ -632,6 +632,14 @@ public bool can_export () { return true; + } + + public void set_cursor (int visible) { + if (visible != NativeWindow.VISIBLE) { + get_window ().set_cursor (new Cursor (CursorType.BLANK_CURSOR)); + } else { + get_window ().set_cursor (new Cursor (CursorType.ARROW)); + } } }
--- a/libbirdfont/NativeWindow.vala +++ b/libbirdfont/NativeWindow.vala @@ -1,5 +1,5 @@ /* - Copyright (C) 2012, 2013, 2014 Johan Mattsson + Copyright (C) 2012, 2013, 2014, 2015 Johan Mattsson This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as @@ -69,8 +69,8 @@ public abstract bool can_export (); /** Set cursor visibility */ - public abstract bool set_cursor (int visible); + public abstract void set_cursor (int visible); } }