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

« back to all changes in this revision

Viewing changes to src/ybutton.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:
187
187
    if (armed != fArmed) {
188
188
        fArmed = armed;
189
189
        repaint();
190
 
        if (fPopup)
 
190
        if (fPopup) {
191
191
            if (fArmed)
192
192
                popup(mouseDown);
193
193
            else
194
194
                popdown();
 
195
        }
195
196
    }
196
197
}
197
198
 
198
199
bool YButton::handleKey(const XKeyEvent &key) {
199
 
    KeySym k = XKeycodeToKeysym(xapp->display(), key.keycode, 0);
 
200
    KeySym k = XKeycodeToKeysym(xapp->display(), (KeyCode)key.keycode, 0);
200
201
    unsigned m = KEY_MODMASK(key.state);
201
 
    int uk = ASCII::toUpper(k);
 
202
    int uk = (k < 256) ? ASCII::toUpper((char)k) : k;
202
203
 
203
204
    if (fEnabled) {
204
205
        if (key.type == KeyPress) {
344
345
        }
345
346
 
346
347
        hotKey = (fHotCharPos != -1) ? fText[fHotCharPos] : -1;
347
 
        hotKey = ASCII::toUpper(hotKey);
 
348
        hotKey = ASCII::toUpper((char)hotKey);
348
349
 
349
350
        if (hotKey != -1) {
350
351
            installAccelerator(hotKey, 0, this);