… | |
… | |
406 | perl_free (perl); |
406 | perl_free (perl); |
407 | } |
407 | } |
408 | } |
408 | } |
409 | |
409 | |
410 | void |
410 | void |
411 | rxvt_perl_interp::init (bool tainted) |
411 | rxvt_perl_interp::init () |
412 | { |
412 | { |
413 | if (!perl) |
413 | if (!perl) |
414 | { |
414 | { |
415 | char *argv[] = { |
415 | char *argv[] = { |
416 | "", |
416 | "", |
|
|
417 | "-T", |
417 | "-edo '" LIBDIR "/urxvt.pm' or ($@ and die $@) or exit 1", |
418 | "-edo '" LIBDIR "/urxvt.pm' or ($@ and die $@) or exit 1", |
418 | "-T", |
|
|
419 | }; |
419 | }; |
420 | |
420 | |
421 | perl = perl_alloc (); |
421 | perl = perl_alloc (); |
422 | perl_construct (perl); |
422 | perl_construct (perl); |
423 | |
423 | |
424 | if (perl_parse (perl, xs_init, 2 + !!tainted, argv, (char **)NULL) |
424 | if (perl_parse (perl, xs_init, 3, argv, (char **)NULL) |
425 | || perl_run (perl)) |
425 | || perl_run (perl)) |
426 | { |
426 | { |
427 | rxvt_warn ("unable to initialize perl-interpreter, continuing without.\n"); |
427 | rxvt_warn ("unable to initialize perl-interpreter, continuing without.\n"); |
428 | |
428 | |
429 | perl_destruct (perl); |
429 | perl_destruct (perl); |
… | |
… | |
782 | } |
782 | } |
783 | OUTPUT: |
783 | OUTPUT: |
784 | RETVAL |
784 | RETVAL |
785 | |
785 | |
786 | void |
786 | void |
787 | rxvt_term::allow_events_async (U32 eventtime = THIS->perl.grabtime) |
787 | rxvt_term::allow_events_async () |
788 | CODE: |
788 | CODE: |
789 | XAllowEvents (THIS->display->display, AsyncBoth, eventtime); |
789 | XAllowEvents (THIS->display->display, AsyncBoth, THIS->perl.grabtime); |
790 | |
790 | |
791 | void |
791 | void |
792 | rxvt_term::allow_events_sync (U32 eventtime = THIS->perl.grabtime) |
792 | rxvt_term::allow_events_sync () |
793 | CODE: |
793 | CODE: |
794 | XAllowEvents (THIS->display->display, SyncBoth, eventtime); |
794 | XAllowEvents (THIS->display->display, SyncBoth, THIS->perl.grabtime); |
795 | |
795 | |
796 | void |
796 | void |
797 | rxvt_term::allow_events_replay (U32 eventtime = THIS->perl.grabtime) |
797 | rxvt_term::allow_events_replay () |
798 | CODE: |
798 | CODE: |
799 | XAllowEvents (THIS->display->display, ReplayPointer, eventtime); |
799 | XAllowEvents (THIS->display->display, ReplayPointer, THIS->perl.grabtime); |
800 | XAllowEvents (THIS->display->display, ReplayKeyboard, eventtime); |
800 | XAllowEvents (THIS->display->display, ReplayKeyboard, THIS->perl.grabtime); |
801 | |
801 | |
802 | void |
802 | void |
803 | rxvt_term::ungrab (U32 eventtime = THIS->perl.grabtime) |
803 | rxvt_term::ungrab () |
804 | CODE: |
804 | CODE: |
|
|
805 | { |
|
|
806 | if (THIS->perl.grabtime) |
|
|
807 | { |
|
|
808 | XUngrabKeyboard (THIS->display->display, THIS->perl.grabtime); |
|
|
809 | XUngrabPointer (THIS->display->display, THIS->perl.grabtime); |
805 | THIS->perl.grabtime = 0; |
810 | THIS->perl.grabtime = 0; |
806 | XUngrabKeyboard (THIS->display->display, eventtime); |
811 | } |
807 | XUngrabPointer (THIS->display->display, eventtime); |
812 | } |
808 | |
813 | |
809 | int |
814 | int |
810 | rxvt_term::strwidth (SV *str) |
815 | rxvt_term::strwidth (SV *str) |
811 | CODE: |
816 | CODE: |
812 | { |
817 | { |