… | |
… | |
638 | XSetIOErrorHandler (rxvt_xioerror_handler); |
638 | XSetIOErrorHandler (rxvt_xioerror_handler); |
639 | |
639 | |
640 | XrmInitialize (); |
640 | XrmInitialize (); |
641 | } |
641 | } |
642 | |
642 | |
643 | /* ------------------------------------------------------------------------- * |
|
|
644 | * MEMORY ALLOCATION WRAPPERS * |
|
|
645 | * ------------------------------------------------------------------------- */ |
|
|
646 | void * |
|
|
647 | rxvt_malloc (size_t size) |
|
|
648 | { |
|
|
649 | void *p = malloc (size); |
|
|
650 | |
|
|
651 | if (!p) |
|
|
652 | rxvt_fatal ("memory allocation failure. aborting.\n"); |
|
|
653 | |
|
|
654 | return p; |
|
|
655 | } |
|
|
656 | |
|
|
657 | void * |
|
|
658 | rxvt_calloc (size_t number, size_t size) |
|
|
659 | { |
|
|
660 | void *p = calloc (number, size); |
|
|
661 | |
|
|
662 | if (!p) |
|
|
663 | rxvt_fatal ("memory allocation failure. aborting.\n"); |
|
|
664 | |
|
|
665 | return p; |
|
|
666 | } |
|
|
667 | |
|
|
668 | void * |
|
|
669 | rxvt_realloc (void *ptr, size_t size) |
|
|
670 | { |
|
|
671 | void *p = realloc (ptr, size); |
|
|
672 | |
|
|
673 | if (!p) |
|
|
674 | rxvt_fatal ("memory allocation failure. aborting.\n"); |
|
|
675 | |
|
|
676 | return p; |
|
|
677 | } |
|
|
678 | |
|
|
679 | /*----------------------------------------------------------------------*/ |
643 | /*----------------------------------------------------------------------*/ |
680 | /* |
644 | /* |
681 | * window size/position calculations for XSizeHint and other storage. |
645 | * window size/position calculations for XSizeHint and other storage. |
682 | * if width/height are non-zero then override calculated width/height |
646 | * if width/height are non-zero then override calculated width/height |
683 | */ |
647 | */ |
… | |
… | |
1713 | void |
1677 | void |
1714 | rxvt_term::get_window_origin (int &x, int &y) |
1678 | rxvt_term::get_window_origin (int &x, int &y) |
1715 | { |
1679 | { |
1716 | Window cr; |
1680 | Window cr; |
1717 | XTranslateCoordinates (dpy, parent[0], display->root, 0, 0, &x, &y, &cr); |
1681 | XTranslateCoordinates (dpy, parent[0], display->root, 0, 0, &x, &y, &cr); |
1718 | /* fprintf( stderr, "origin is %+d%+d\n", x, y);*/ |
1682 | /* fprintf (stderr, "origin is %+d%+d\n", x, y);*/ |
1719 | } |
1683 | } |
1720 | |
1684 | |
1721 | Pixmap |
1685 | Pixmap |
1722 | rxvt_term::get_pixmap_property (int prop_id) |
1686 | rxvt_term::get_pixmap_property (int prop_id) |
1723 | { |
1687 | { |
… | |
… | |
1766 | refresh = .05; |
1730 | refresh = .05; |
1767 | else if (bgPixmap.flags & bgPixmap_t::blurNeeded) |
1731 | else if (bgPixmap.flags & bgPixmap_t::blurNeeded) |
1768 | refresh = .20; /* very slow !!! */ |
1732 | refresh = .20; /* very slow !!! */ |
1769 | else |
1733 | else |
1770 | refresh = .07; |
1734 | refresh = .07; |
1771 | update_background_ev.start (refresh); |
1735 | update_background_ev.start (refresh); |
1772 | } |
1736 | } |
1773 | |
1737 | |
1774 | return 0; |
1738 | return 0; |
1775 | } |
1739 | } |
1776 | |
1740 | |