diff --git a/lib/App/Asciio/GTK/Asciio.pm b/lib/App/Asciio/GTK/Asciio.pm index cca3e095..437f9213 100644 --- a/lib/App/Asciio/GTK/Asciio.pm +++ b/lib/App/Asciio/GTK/Asciio.pm @@ -41,6 +41,9 @@ my $display = $asciio->{widget}->get_display(); my $cursor = Gtk3::Gdk::Cursor->new_for_display($display, 'blank-cursor'); my $win = $asciio->{widget}->get_parent_window() ; + +$asciio->{CACHE}{CURSOR} = $win->get_cursor() ; + $win->set_cursor($cursor); # fleur # x_cursor @@ -51,7 +54,16 @@ sub show_pointer my ($asciio) = @_ ; my $display = $asciio->{widget}->get_display(); -my $cursor = Gtk3::Gdk::Cursor->new_for_display($display, 'arrow'); +my $cursor ; + +if (exists $asciio->{CACHE}{CURSOR}) + { + $cursor = $asciio->{CACHE}{CURSOR} ; + } +else + { + $cursor = Gtk3::Gdk::Cursor->new_for_display($display, 'arrow'); + } my $win = $asciio->{widget}->get_parent_window() ; $win->set_cursor($cursor);