… | |
… | |
11 | * Copyright (c) 1997 mj olesen <olesen@me.QueensU.CA> |
11 | * Copyright (c) 1997 mj olesen <olesen@me.QueensU.CA> |
12 | * - extensive modifications |
12 | * - extensive modifications |
13 | * Copyright (c) 1997,1998 Oezguer Kesim <kesim@math.fu-berlin.de> |
13 | * Copyright (c) 1997,1998 Oezguer Kesim <kesim@math.fu-berlin.de> |
14 | * Copyright (c) 1998-2001 Geoff Wing <gcw@pobox.com> |
14 | * Copyright (c) 1998-2001 Geoff Wing <gcw@pobox.com> |
15 | * - extensive modifications |
15 | * - extensive modifications |
16 | * Copyright (c) 2003-2008 Marc Lehmann <pcg@goof.com> |
16 | * Copyright (c) 2003-2010 Marc Lehmann <pcg@goof.com> |
17 | * |
17 | * |
18 | * This program is free software; you can redistribute it and/or modify |
18 | * This program is free software; you can redistribute it and/or modify |
19 | * it under the terms of the GNU General Public License as published by |
19 | * it under the terms of the GNU General Public License as published by |
20 | * the Free Software Foundation; either version 2 of the License, or |
20 | * the Free Software Foundation; either version 2 of the License, or |
21 | * (at your option) any later version. |
21 | * (at your option) any later version. |
… | |
… | |
359 | rxvt_term::destroy_cb (ev::idle &w, int revents) |
359 | rxvt_term::destroy_cb (ev::idle &w, int revents) |
360 | { |
360 | { |
361 | make_current (); |
361 | make_current (); |
362 | |
362 | |
363 | delete this; |
363 | delete this; |
|
|
364 | } |
|
|
365 | |
|
|
366 | void |
|
|
367 | rxvt_term::set_option (uint8_t opt, bool set) |
|
|
368 | { |
|
|
369 | if (!opt) |
|
|
370 | return; |
|
|
371 | |
|
|
372 | uint8_t mask = 1 << (opt & 7); |
|
|
373 | uint8_t &val = options [opt >> 3]; |
|
|
374 | |
|
|
375 | val = val & ~mask | (set ? mask : 0); |
364 | } |
376 | } |
365 | |
377 | |
366 | /*----------------------------------------------------------------------*/ |
378 | /*----------------------------------------------------------------------*/ |
367 | /* |
379 | /* |
368 | * Exit gracefully, clearing the utmp entry and restoring tty attributes |
380 | * Exit gracefully, clearing the utmp entry and restoring tty attributes |
… | |
… | |
1632 | } |
1644 | } |
1633 | |
1645 | |
1634 | Pixmap |
1646 | Pixmap |
1635 | rxvt_term::get_pixmap_property (int prop_id) |
1647 | rxvt_term::get_pixmap_property (int prop_id) |
1636 | { |
1648 | { |
|
|
1649 | Pixmap pixmap = None; |
|
|
1650 | |
1637 | if (prop_id > 0 && prop_id < NUM_XA) |
1651 | if (prop_id > 0 && prop_id < NUM_XA) |
1638 | if (xa[prop_id]) |
1652 | if (xa[prop_id]) |
1639 | { |
1653 | { |
1640 | int aformat; |
1654 | int aformat; |
1641 | unsigned long nitems, bytes_after; |
1655 | unsigned long nitems, bytes_after; |
… | |
… | |
1643 | unsigned char *prop = NULL; |
1657 | unsigned char *prop = NULL; |
1644 | int result = XGetWindowProperty (dpy, display->root, xa[prop_id], |
1658 | int result = XGetWindowProperty (dpy, display->root, xa[prop_id], |
1645 | 0L, 1L, False, XA_PIXMAP, &atype, &aformat, |
1659 | 0L, 1L, False, XA_PIXMAP, &atype, &aformat, |
1646 | &nitems, &bytes_after, &prop); |
1660 | &nitems, &bytes_after, &prop); |
1647 | if (result == Success && prop && atype == XA_PIXMAP) |
1661 | if (result == Success && prop && atype == XA_PIXMAP) |
1648 | return *(Pixmap *)prop; |
1662 | pixmap = *(Pixmap *)prop; |
|
|
1663 | XFree (prop); |
1649 | } |
1664 | } |
1650 | |
1665 | |
1651 | return None; |
1666 | return pixmap; |
1652 | } |
1667 | } |
1653 | |
1668 | |
1654 | #ifdef HAVE_BG_PIXMAP |
1669 | #ifdef HAVE_BG_PIXMAP |
1655 | |
1670 | |
1656 | void |
1671 | void |