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

« back to all changes in this revision

Viewing changes to src/ymenu.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:
308
308
}
309
309
 
310
310
bool YMenu::handleKey(const XKeyEvent &key) {
311
 
    KeySym k = XKeycodeToKeysym(xapp->display(), key.keycode, 0);
 
311
    KeySym k = XKeycodeToKeysym(xapp->display(), (KeyCode)key.keycode, 0);
312
312
    int m = KEY_MODMASK(key.state);
313
313
 
314
314
    if (key.type == KeyPress) {
339
339
                        return true;
340
340
                    }
341
341
                } else if ((k < 256) && ((m & ~ShiftMask) == 0)) {
342
 
                    if (findHotItem(ASCII::toUpper(k)) == 1) {
 
342
                    if (findHotItem(ASCII::toUpper((char)k)) == 1) {
343
343
                        if (!(m & ShiftMask))
344
344
                            activateItem(key.state, false);
345
345
                    }
763
763
 
764
764
        h = fItems[i]->queryHeight(top, bottom, pad);
765
765
 
766
 
        if (my >= y && my < y + h && mx > 0 && mx < int(width()) - 1)
 
766
        if (my >= y && my < y + h && mx > 0 && mx < int(width()) - 1) {
767
767
            if (!fItems[i]->isSeparator())
768
768
                return i;
769
769
            else
770
770
                return -1;
 
771
        }
771
772
 
772
773
        y += h;
773
774
    }