File tree Expand file tree Collapse file tree 5 files changed +12
-2
lines changed
screen-capture-wayland-portal/src Expand file tree Collapse file tree 5 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 5454 cp -rf release/$binary_name-cursor $binary_name-cursor
5555 tar -zcf $output $binary_name-cursor
5656 cp $output ..
57- echo "ASSET =$output" >> $GITHUB_ENV
57+ echo "CURSOR_ASSET =$output" >> $GITHUB_ENV
5858
5959 output="$binary_name-portal-${{ env.VERSION }}-x86_64-linux.deb"
6060 cp -rf $binary_name.deb $output
6868 with :
6969 files : |
7070 ${{ env.ASSET }}
71+ ${{ env.CURSOR_ASSET }}
7172 ${{ env.DEB_ASSET }}
7273
7374 - run : echo "🍏 This job's status is ${{ job.status }}."
Original file line number Diff line number Diff line change @@ -40,6 +40,10 @@ fn process_mouse_positions(
4040 callback : & mut ( impl FnMut ( CursorPosition ) + Send + ' static ) ,
4141) -> Result < ( ) > {
4242 loop {
43+ if config. stop_sig . load ( Ordering :: Relaxed ) {
44+ break ;
45+ }
46+
4347 let pos = receive_position ( stream) ?;
4448 let x = ( ( pos >> 32 ) & 0x0000_0000_ffff_ffff ) as i32 ;
4549 let y = ( pos & 0x0000_0000_ffff_ffff ) as i32 ;
@@ -59,6 +63,8 @@ fn process_mouse_positions(
5963
6064 std:: thread:: sleep ( Duration :: from_millis ( 5 ) ) ;
6165 }
66+
67+ Ok ( ( ) )
6268}
6369
6470fn receive_position ( stream : & mut UnixStream ) -> Result < u64 > {
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ pub trait ScreenCapture {
2828 cb : impl FnMut ( CaptureStreamCallbackData ) ,
2929 ) -> Result < CaptureStatus , ScreenCaptureError > ;
3030
31+ // don't same the same cursor position twice
3132 fn monitor_cursor_position (
3233 & mut self ,
3334 config : MonitorCursorPositionConfig ,
Original file line number Diff line number Diff line change @@ -72,6 +72,8 @@ fn server() -> Result<()> {
7272 log:: warn!( "send position failed: {e}" ) ;
7373 break ;
7474 }
75+
76+ LAST_SENT_POSITION . store ( pos, Ordering :: Relaxed ) ;
7577 }
7678
7779 std:: thread:: sleep ( std:: time:: Duration :: from_millis ( 5 ) ) ;
Original file line number Diff line number Diff line change 1- pub static VERSION : & str = "v0.2.9" ;
1+ pub static VERSION : & str = "v0.2.9-beta1 " ;
You can’t perform that action at this time.
0 commit comments