… | |
… | |
536 | |
536 | |
537 | return f; |
537 | return f; |
538 | } |
538 | } |
539 | #endif |
539 | #endif |
540 | |
540 | |
541 | /*----------------------------------------------------------------------* |
|
|
542 | * miscellaneous drawing routines |
|
|
543 | */ |
|
|
544 | |
|
|
545 | /* |
|
|
546 | * Draw top/left and bottom/right border shadows around windows |
|
|
547 | */ |
|
|
548 | #ifdef RXVT_SCROLLBAR |
|
|
549 | void |
|
|
550 | rxvt_Draw_Shadow (Display *display, Window win, GC topShadow, GC botShadow, int x, int y, int w, int h) |
|
|
551 | { |
|
|
552 | int shadow; |
|
|
553 | |
|
|
554 | shadow = (w == 0 || h == 0) ? 1 : 2; |
|
|
555 | w += x - 1; |
|
|
556 | h += y - 1; |
|
|
557 | for (; shadow-- > 0; x++, y++, w--, h--) |
|
|
558 | { |
|
|
559 | XDrawLine (display, win, topShadow, x, y, w, y); |
|
|
560 | XDrawLine (display, win, topShadow, x, y, x, h); |
|
|
561 | XDrawLine (display, win, botShadow, w, h, w, y + 1); |
|
|
562 | XDrawLine (display, win, botShadow, w, h, x + 1, h); |
|
|
563 | } |
|
|
564 | } |
|
|
565 | #endif |
|
|
566 | |
|
|
567 | // should not be used in interactive programs, for obvious reasons |
541 | // should not be used in interactive programs, for obvious reasons |
568 | void rxvt_usleep (int usecs) |
542 | void rxvt_usleep (int usecs) |
569 | { |
543 | { |
570 | #if HAVE_NANOSLEEP |
544 | #if HAVE_NANOSLEEP |
571 | struct timespec ts; |
545 | struct timespec ts; |