MOUSE_CLICK
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 19 Sep 2010 16:40:42 +0000 (18:40 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 19 Sep 2010 16:40:42 +0000 (18:40 +0200)
premotedroid-server.pl

index da8c17d..1719d01 100755 (executable)
@@ -47,6 +47,10 @@ while ( my $client = $sock->accept() ) {
                        read $client, my $move, 4;
                        my ( $x, $y ) = unpack 'ss', $move;
                        warn "MOVE $x $y\n";
+               } elsif ( $command == MOUSE_CLICK ) {
+                       read $client, my $b, 2;
+                       my ( $button, $state ) = unpack 'cc', $b;
+                       warn "MOUSE_CLICK $button $state\n";
                } elsif ( $command == AUTHENTIFICATION ) {
                        my $auth = readUTF $client;
                        warn "AUTHENTIFICATION [$auth]\n";