~cmiller/ubuntu/trusty/icewm/translations-cause-crash-lp447883

« back to all changes in this revision

Viewing changes to src/ylistbox.cc

  • Committer: Bazaar Package Importer
  • Author(s): Eduard Bloch
  • Date: 2009-01-26 00:18:14 UTC
  • mfrom: (1.3.1 upstream) (5.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20090126001814-ea5ceoy4uroruz72
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
305
305
 
306
306
bool YListBox::handleKey(const XKeyEvent &key) {
307
307
    if (key.type == KeyPress) {
308
 
        KeySym k = XKeycodeToKeysym(xapp->display(), key.keycode, 0);
 
308
        KeySym k = XKeycodeToKeysym(xapp->display(), (KeyCode)key.keycode, 0);
309
309
        int m = KEY_MODMASK(key.state);
310
310
 
311
311
        bool clear = (m & ControlMask) ? false : true;
395
395
            }
396
396
        default:
397
397
            if (k < 256) {
398
 
                unsigned char c = ASCII::toUpper(k);
 
398
                unsigned char c = ASCII::toUpper((char)k);
399
399
                int count = getItemCount();
400
400
                int i = fFocusedItem;
401
401
                YListItem *it = 0;
835
835
    if (fDragging) {
836
836
        int beg = (fSelectStart < fSelectEnd) ? fSelectStart : fSelectEnd;
837
837
        int end = (fSelectStart < fSelectEnd) ? fSelectEnd : fSelectStart;
838
 
        if (n >= beg && n <= end)
 
838
        if (n >= beg && n <= end) {
839
839
            if (fSelect)
840
840
                s = true;
841
841
            else
842
842
                s = false;
 
843
        }
843
844
    }
844
845
    return s;
845
846
}