… | |
… | |
571 | old_xerror_handler = XSetErrorHandler ((XErrorHandler) rxvt_xerror_handler); |
571 | old_xerror_handler = XSetErrorHandler ((XErrorHandler) rxvt_xerror_handler); |
572 | // TODO: handle this with exceptions and tolerate the memory loss |
572 | // TODO: handle this with exceptions and tolerate the memory loss |
573 | XSetIOErrorHandler (rxvt_xioerror_handler); |
573 | XSetIOErrorHandler (rxvt_xioerror_handler); |
574 | |
574 | |
575 | XrmInitialize (); |
575 | XrmInitialize (); |
|
|
576 | |
|
|
577 | #ifdef HAVE_PIXBUF |
|
|
578 | g_type_init (); |
|
|
579 | #endif |
576 | } |
580 | } |
577 | |
581 | |
578 | /*----------------------------------------------------------------------*/ |
582 | /*----------------------------------------------------------------------*/ |
579 | /* |
583 | /* |
580 | * window size/position calculations for XSizeHint and other storage. |
584 | * window size/position calculations for XSizeHint and other storage. |
… | |
… | |
1620 | { |
1624 | { |
1621 | Window cr; |
1625 | Window cr; |
1622 | XTranslateCoordinates (dpy, parent, display->root, 0, 0, &x, &y, &cr); |
1626 | XTranslateCoordinates (dpy, parent, display->root, 0, 0, &x, &y, &cr); |
1623 | } |
1627 | } |
1624 | |
1628 | |
1625 | Pixmap |
|
|
1626 | rxvt_term::get_pixmap_property (Atom property) |
|
|
1627 | { |
|
|
1628 | Pixmap pixmap = None; |
|
|
1629 | |
|
|
1630 | int aformat; |
|
|
1631 | unsigned long nitems, bytes_after; |
|
|
1632 | Atom atype; |
|
|
1633 | unsigned char *prop; |
|
|
1634 | int result = XGetWindowProperty (dpy, display->root, property, |
|
|
1635 | 0L, 1L, False, XA_PIXMAP, &atype, &aformat, |
|
|
1636 | &nitems, &bytes_after, &prop); |
|
|
1637 | if (result == Success) |
|
|
1638 | { |
|
|
1639 | if (atype == XA_PIXMAP) |
|
|
1640 | pixmap = *(Pixmap *)prop; |
|
|
1641 | XFree (prop); |
|
|
1642 | } |
|
|
1643 | |
|
|
1644 | return pixmap; |
|
|
1645 | } |
|
|
1646 | |
|
|
1647 | #ifdef HAVE_BG_PIXMAP |
1629 | #ifdef HAVE_BG_PIXMAP |
1648 | |
1630 | |
1649 | void |
1631 | void |
1650 | rxvt_term::update_background () |
1632 | rxvt_term::update_background () |
1651 | { |
1633 | { |