IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 2935


Ignore:
Timestamp:
Jan 8, 2005, 2:42:33 PM (22 years ago)
Author:
eugene
Message:

fixed bug with mod keys

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/kii/picture/cursor.c

    r2889 r2935  
    3737
    3838    if (LastEvent (display, KeyPress,        &event)) {
    39       value = XLookupString ((XKeyEvent *) &event, string, 9, &keysym, &composestatus);
    40      
    41       if ((event.xkey.x >= layout[0].picture.x) && (event.xkey.x <= layout[0].picture.x + layout[0].picture.dx) &&
    42           (event.xkey.y >= layout[0].picture.y) && (event.xkey.y <= layout[0].picture.y + layout[0].picture.dy)) {
     39      status = XLookupString ((XKeyEvent *) &event, string, 9, &keysym, &composestatus);
     40
     41      if (!status) continue;
     42      if (event.xkey.x < layout[0].picture.x) continue;
     43      if (event.xkey.x > layout[0].picture.x + layout[0].picture.dx) continue;
     44      if (event.xkey.y < layout[0].picture.y) continue;
     45      if (event.xkey.y > layout[0].picture.y + layout[0].picture.dy) continue;
    4346       
    44         Screen_to_Image (&x, &y, (double)event.xkey.x, (double)event.xkey.y, layout);
     47      Screen_to_Image (&x, &y, (double)event.xkey.x, (double)event.xkey.y, layout);
    4548
    46         if (isprint(string[0]))
    47           sprintf (line, "%c %6.1f %6.1f ", string[0], x, y);
    48         else {
    49           sprintf (line, "X %6.1f %6.1f ", x, y);
    50           break;
    51         }
    52         write (layout[0].Ximage, line, 16);
     49      if (isprint(string[0]))
     50        sprintf (line, "%c %6.1f %6.1f ", string[0], x, y);
     51      else {
     52        sprintf (line, "X %6.1f %6.1f ", x, y);
    5353      }
     54      write (layout[0].Ximage, line, 16);
    5455    }
    5556  }
Note: See TracChangeset for help on using the changeset viewer.