Ignore:
Timestamp:
May 22, 2009, 11:03:40 AM (11 years ago)
Author:
Pascal Terjan
Message:

Send cursor position, now that we no longer export full canvas

File:
1 edited

Legend:

Unmodified
Added
Removed
  • neercs/trunk/src/server.c

    r3498 r3500  
    111111        size_t bytes;
    112112        void *buf;
    113         char buf2[30];
     113        char buf2[32];
    114114        int x, y, w, h, i;
    115115
     
    137137            debug("Requesting refresh for %d", bytes);
    138138            towrite = bytes;
    139             sprintf(buf2, "UPDATE %10d %10d ", x, y);
    140             ret = write(screen_list->socket[SOCK_CLIENT], buf2, 29);
     139            sprintf(buf2, "UPDATE %10d %10d", x, y);
     140            ret = write(screen_list->socket[SOCK_CLIENT], buf2, strlen(buf2)+1);
    141141            if(ret < 29 && errno != EAGAIN)
    142142            {
     
    164164            free(buf);
    165165        }
    166         write(screen_list->socket[SOCK_CLIENT], "REFRESH", 7);
     166        sprintf(buf2, "REFRESH %10d %10d", caca_get_cursor_x(screen_list->cv), caca_get_cursor_y(screen_list->cv));
     167        write(screen_list->socket[SOCK_CLIENT], buf2, strlen(buf2)+1);
    167168#if defined HAVE_CACA_DIRTY_RECTANGLES
    168169        caca_clear_dirty_rect_list(screen_list->cv);
Note: See TracChangeset for help on using the changeset viewer.