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

« back to all changes in this revision

Viewing changes to src/wmswitch.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:
202
202
                ? fActiveWindow->clientIcon()->huge()
203
203
                : fActiveWindow->clientIcon()->large();
204
204
 
205
 
            if (icon != null)
 
205
            if (icon != null) {
206
206
                if (quickSwitchTextFirst) {
207
207
                    g.drawImage(icon,
208
208
                                width() - icon->width() - quickSwitchIMargin,
215
215
                    tOfs = icon->width() + quickSwitchIMargin
216
216
                        + quickSwitchSepSize;
217
217
                }
 
218
            }
218
219
 
219
220
            if (quickSwitchSepSize) {
220
221
                const int ip(icon->width() + 2 * quickSwitchIMargin +
362
363
                ref<YIconImage> icon =
363
364
                    frame->clientIcon()->large();
364
365
 
365
 
                if (icon != null)
 
366
                if (icon != null) {
366
367
                    if (quickSwitchTextFirst) {
367
368
 
368
369
                        // prepaint icons because of too long strings
381
382
                                    quickSwitchIMargin,
382
383
                                    pos + quickSwitchIMargin);
383
384
                    }
 
385
                }
384
386
            }
385
387
 
386
388
            pos += ih + 2* quickSwitchIMargin;
682
684
}
683
685
 
684
686
bool SwitchWindow::handleKey(const XKeyEvent &key) {
685
 
    KeySym k = XKeycodeToKeysym(xapp->display(), key.keycode, 0);
 
687
    KeySym k = XKeycodeToKeysym(xapp->display(), (KeyCode)key.keycode, 0);
686
688
    unsigned int m = KEY_MODMASK(key.state);
687
689
    unsigned int vm = VMod(m);
688
690
 
707
709
        if ((IS_WMKEY(k, vm, gKeySysSwitchNext)) && !modDown(m)) {
708
710
            accept();
709
711
            return true;
710
 
        } else if (isModKey(key.keycode)) {
 
712
        } else if (isModKey((KeyCode)key.keycode)) {
711
713
            accept();
712
714
            return true;
713
715
        }