~ubuntu-branches/debian/sid/fbterm/sid

« back to all changes in this revision

Viewing changes to src/fbshell.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Nobuhiro Iwamatsu
  • Date: 2009-12-01 23:12:53 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20091201231253-0t86i1w6d7t8nhgi
Tags: 1.6-1
* New upstream release
* Change e-mail address.
* Remove DM-Upload-Allowed field.
* Update Standards-Version.
* Add README.source file.
* Update patch.
  patches/01_add_terminfo_path.dpatch

Show diffs side-by-side

added added

removed removed

Lines of Context:
359
359
        if (manager->activeShell() != this) return;
360
360
 
361
361
        adjustCharAttr(attr);
362
 
        screen->drawText(x, y, w, attr.fcolor, attr.bcolor, num, chars, dws);
 
362
 
 
363
        if (mImProxy) {
 
364
                Rectangle rect = { FW(x), FH(y), FW(w), FH(1) };
 
365
 
 
366
                IntersectState state =  mImProxy->intersectWithImWin(rect);
 
367
                if (state != Inside) {
 
368
                        screen->drawText(FW(x), FH(y), attr.fcolor, attr.bcolor, num, chars, dws);
 
369
                        if (state == Intersect) mImProxy->redrawImWin(rect);
 
370
                }
 
371
        } else {
 
372
                screen->drawText(FW(x), FH(y), attr.fcolor, attr.bcolor, num, chars, dws);
 
373
        }
363
374
}
364
375
 
365
376
bool FbShell::moveChars(u16 sx, u16 sy, u16 dx, u16 dy, u16 w, u16 h)
410
421
        case CurNone:
411
422
                break;
412
423
 
413
 
        case CurUnderline:
414
 
                screen->drawUnderline(mCursor.x, mCursor.y, mCursor.showed ? mCursor.attr.fcolor : mCursor.attr.bcolor);
 
424
        case CurUnderline: {
 
425
                Rectangle rect = { FW(mCursor.x), FH(mCursor.y + 1) - 1, FW(1), 1 };
 
426
                IntersectState state = Outside;
 
427
 
 
428
                if (mImProxy) state = mImProxy->intersectWithImWin(rect);
 
429
                if (state != Inside) {
 
430
                        screen->fillRect(rect.x, rect.y, rect.w, rect.h, mCursor.showed ? mCursor.attr.fcolor : mCursor.attr.bcolor);
 
431
                }
415
432
                break;
 
433
        }
416
434
 
417
435
        default: {
418
436
                bool dw = (mCursor.attr.type != CharAttr::Single);
420
438
                u16 x = mCursor.x;
421
439
                if (mCursor.attr.type == CharAttr::DoubleRight) x--;
422
440
 
423
 
                u8 fc = mCursor.attr.fcolor, bc = mCursor.attr.bcolor;
 
441
                CharAttr attr = mCursor.attr;
424
442
                if (mCursor.showed) {
425
 
                        u8 temp = fc;
426
 
                        fc = bc;
427
 
                        bc = temp;
 
443
                        u8 temp = attr.fcolor;
 
444
                        attr.fcolor = attr.bcolor;
 
445
                        attr.bcolor = temp;
428
446
                }
429
447
 
430
 
                screen->drawText(x, mCursor.y, dw ? 2 : 1, fc, bc, 1, &mCursor.code, &dw);
 
448
                drawChars(attr, x, mCursor.y, dw ? FW(2) : FW(1), 1, &mCursor.code, &dw);
431
449
                break;
432
450
        }
433
451
        }
626
644
                u16 code = charCode(x, y);
627
645
 
628
646
                if (attr.type == CharAttr::DoubleRight) x--;
629
 
                screen->drawText(x, y, dw ? 2 : 1, attr.bcolor, attr.fcolor, 1, &code, &dw);
 
647
                screen->drawText(FW(x), FH(y), attr.bcolor, attr.fcolor, 1, &code, &dw);
630
648
 
631
649
                mMousePointer.x = x;
632
650
                mMousePointer.y = y;