Skip to content

Commit abe4f84

Browse files
committed
Fixing issues with --use-clipboard option
1 parent 6c679bc commit abe4f84

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/Application.vala

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,12 @@ public class Annotator : Gtk.Application {
6868
Process.exit( 1 );
6969
}
7070
} else if( use_clipboard ) {
71-
if( !appwin.do_paste_image() ) {
72-
stderr.printf( _( "\nERROR: Image does not exist on the clipboard\n" ) );
73-
Process.exit( 1 );
74-
}
71+
AnnotatorClipboard.get_clipboard().changed.connect(() => {
72+
if( !appwin.do_paste_image() ) {
73+
stderr.printf( _( "\nERROR: Image does not exist on the clipboard\n" ) );
74+
Process.exit( 1 );
75+
}
76+
});
7577
} else if( take_screenshot ) {
7678
appwin.do_screenshot();
7779
}

0 commit comments

Comments
 (0)