Changeset 223

Show
Ignore:
Timestamp:
06/27/07 13:50:55 (1 year ago)
Author:
takkaria
Message:

Fix mouse support on X11 (Nick McConnell?).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/main-x11.c

    r214 r223  
    16301630        term_data *td = (term_data*)(Term->data); 
    16311631 
    1632         (*x) = (ox - Infowin->ox - 13 * Infofnt->wid) / td->tile_wid; 
    1633         (*y) = (oy - Infowin->oy) / td->tile_hgt - 1
     1632        (*x) = (ox - Infowin->ox) / td->tile_wid; 
     1633        (*y) = (oy - Infowin->oy) / td->tile_hgt
    16341634} 
    16351635 
     
    16951695                case ButtonPress: 
    16961696                { 
     1697                        bool press = (xev->type == ButtonPress); 
     1698 
    16971699                        int z = 0; 
    16981700 
     
    17111713                        /* The co-ordinates are only used in Angband format. */ 
    17121714                        pixel_to_square(&x, &y, x, y); 
    1713                         Term_mousepress(x, y, 0); 
     1715                        if (press) Term_mousepress(x, y, z); 
    17141716 
    17151717                        break; 
     
    24412443 
    24422444        /* Ask for certain events */ 
    2443         Infowin_set_mask(ExposureMask | StructureNotifyMask | KeyPressMask); 
     2445        Infowin_set_mask(ExposureMask | StructureNotifyMask | KeyPressMask 
     2446                         | ButtonPressMask); 
    24442447 
    24452448        /* Set the window name */ 
     
    29642967#endif /* USE_X11 */ 
    29652968 
     2969