Changeset 4099 for neercs


Ignore:
Timestamp:
Dec 7, 2009, 1:34:59 PM (10 years ago)
Author:
Jean-Yves Lamoureux
Message:
  • Mouse support now handles window position
File:
1 edited

Legend:

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

    r4098 r4099  
    253253            if (screen_list->screen[screen_list->pty]->report_mouse)
    254254            {
    255                 int x = atoi(buf + 7);
    256                 int y = atoi(buf + 18);
     255                int x = 1 + atoi(buf + 7) - screen_list->screen[screen_list->pty]->x;
     256                int y = 1 + atoi(buf + 18) - screen_list->screen[screen_list->pty]->y;
    257257                int b = atoi(buf + 28);
    258258                sprintf(buf, "\x1b[M%c%c%c", '@'+(b-1), x+32, y+32);
     
    264264            if (screen_list->screen[screen_list->pty]->report_mouse)
    265265            {
    266                 int x = atoi(buf + 7);
    267                 int y = atoi(buf + 18);
     266                int x = 1 + atoi(buf + 7) - screen_list->screen[screen_list->pty]->x;
     267                int y = 1 + atoi(buf + 18) - screen_list->screen[screen_list->pty]->y;
    268268                sprintf(buf, "\x1b[M%c%c%c", '@', x+32, y+32);
    269269                send_ansi_sequence(screen_list, buf);
Note: See TracChangeset for help on using the changeset viewer.