… | |
… | |
361 | make_current (); |
361 | make_current (); |
362 | |
362 | |
363 | delete this; |
363 | delete this; |
364 | } |
364 | } |
365 | |
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); |
|
|
376 | } |
|
|
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 |
369 | * TODO: if debugging, this should free up any known resources if we can |
381 | * TODO: if debugging, this should free up any known resources if we can |
370 | */ |
382 | */ |
… | |
… | |
511 | tio->c_cc[VWERSE] = CWERASE; |
523 | tio->c_cc[VWERSE] = CWERASE; |
512 | # endif |
524 | # endif |
513 | # ifdef VLNEXT |
525 | # ifdef VLNEXT |
514 | tio->c_cc[VLNEXT] = CLNEXT; |
526 | tio->c_cc[VLNEXT] = CLNEXT; |
515 | # endif |
527 | # endif |
|
|
528 | # ifdef VSTATUS |
|
|
529 | tio->c_cc[VSTATUS] = CSTATUS; |
|
|
530 | # endif |
516 | |
531 | |
517 | # if VMIN != VEOF |
532 | # if VMIN != VEOF |
518 | tio->c_cc[VMIN] = 1; |
533 | tio->c_cc[VMIN] = 1; |
519 | # endif |
534 | # endif |
520 | # if VTIME != VEOL |
535 | # if VTIME != VEOL |
… | |
… | |
553 | rxvt_get_ttymode (&rxvt_term::def_tio); |
568 | rxvt_get_ttymode (&rxvt_term::def_tio); |
554 | |
569 | |
555 | // get rid of stdin/stdout as we don't need them, to free resources |
570 | // get rid of stdin/stdout as we don't need them, to free resources |
556 | dup2 (STDERR_FILENO, STDIN_FILENO); |
571 | dup2 (STDERR_FILENO, STDIN_FILENO); |
557 | dup2 (STDERR_FILENO, STDOUT_FILENO); |
572 | dup2 (STDERR_FILENO, STDOUT_FILENO); |
558 | |
|
|
559 | ptytty::init (); |
|
|
560 | |
573 | |
561 | if (!ev_default_loop ()) |
574 | if (!ev_default_loop ()) |
562 | rxvt_fatal ("cannot initialise libev (bad value for LIBEV_METHODS?)\n"); |
575 | rxvt_fatal ("cannot initialise libev (bad value for LIBEV_METHODS?)\n"); |
563 | |
576 | |
564 | rxvt_environ = environ; |
577 | rxvt_environ = environ; |
… | |
… | |
1626 | void |
1639 | void |
1627 | rxvt_term::get_window_origin (int &x, int &y) |
1640 | rxvt_term::get_window_origin (int &x, int &y) |
1628 | { |
1641 | { |
1629 | Window cr; |
1642 | Window cr; |
1630 | XTranslateCoordinates (dpy, parent[0], display->root, 0, 0, &x, &y, &cr); |
1643 | XTranslateCoordinates (dpy, parent[0], display->root, 0, 0, &x, &y, &cr); |
1631 | /* fprintf (stderr, "origin is %+d%+d\n", x, y);*/ |
|
|
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 | { |
… | |
… | |
1650 | |
1662 | |
1651 | return None; |
1663 | return None; |
1652 | } |
1664 | } |
1653 | |
1665 | |
1654 | #ifdef HAVE_BG_PIXMAP |
1666 | #ifdef HAVE_BG_PIXMAP |
1655 | # if TRACE_PIXMAPS |
|
|
1656 | # undef update_background |
|
|
1657 | void |
|
|
1658 | rxvt_term::trace_update_background (const char *file, int line) |
|
|
1659 | { |
|
|
1660 | fprintf (stderr, "%s:%d:update_background()\n", file, line); |
|
|
1661 | update_background (); |
|
|
1662 | } |
|
|
1663 | # endif |
|
|
1664 | |
1667 | |
1665 | void |
1668 | void |
1666 | rxvt_term::update_background () |
1669 | rxvt_term::update_background () |
1667 | { |
1670 | { |
1668 | if (update_background_ev.is_active ()) |
1671 | if (update_background_ev.is_active ()) |