From 996c9abcaedc2bfeadd9833d5531c8da2cc215de Mon Sep 17 00:00:00 2001 From: root Date: Mon, 16 Jan 2006 08:29:57 +0000 Subject: [PATCH] *** empty log message *** --- src/command.C | 4 +++- src/main.C | 8 -------- src/rxvt.h | 7 ++++++- src/rxvtperl.h | 15 ++++++++++----- 4 files changed, 19 insertions(+), 15 deletions(-) diff --git a/src/command.C b/src/command.C index 75882ce0..8b711101 100644 --- a/src/command.C +++ b/src/command.C @@ -1308,6 +1308,7 @@ rxvt_term::x_cb (XEvent &ev) dDisp; if (ev.xany.window == vt + && SHOULD_INVOKE (HOOK_X_EVENT) && HOOK_INVOKE ((this, HOOK_X_EVENT, DT_XEVENT, &ev, DT_END))) return; @@ -1617,7 +1618,8 @@ rxvt_term::x_cb (XEvent &ev) if (ev.xany.window == vt) { - if (HOOK_INVOKE ((this, HOOK_MOTION_NOTIFY, DT_XEVENT, &ev, DT_END))) + if (SHOULD_INVOKE (HOOK_MOTION_NOTIFY) + && HOOK_INVOKE ((this, HOOK_MOTION_NOTIFY, DT_XEVENT, &ev, DT_END))) ; // nop else if (ev.xbutton.state & (Button1Mask | Button3Mask)) { diff --git a/src/main.C b/src/main.C index ae3210b3..233c5091 100644 --- a/src/main.C +++ b/src/main.C @@ -91,14 +91,6 @@ rxvt_pop_locale () rxvt_set_locale (savelocale); } -void -rxvt_term::make_current () const -{ - SET_R (this); - rxvt_set_locale (locale); - set_environ (envv); -} - #if ENABLE_COMBINING class rxvt_composite_vec rxvt_composite; diff --git a/src/rxvt.h b/src/rxvt.h index bf7b4994..5bd6073d 100644 --- a/src/rxvt.h +++ b/src/rxvt.h @@ -1286,7 +1286,12 @@ struct rxvt_term : zero_initialized, rxvt_vars { bool pty_fill (); - void make_current () const; // make this the "currently active" urxvt instance + void make_current () const // make this the "currently active" urxvt instance + { + SET_R (this); + rxvt_set_locale (locale); + set_environ (envv); + } void init_secondary (); const char **init_resources (int argc, const char *const *argv); diff --git a/src/rxvtperl.h b/src/rxvtperl.h index a180ce36..11f57ef3 100644 --- a/src/rxvtperl.h +++ b/src/rxvtperl.h @@ -6,18 +6,23 @@ #define RXVTPERL_H_ #if ENABLE_PERL -# define SHOULD_INVOKE(htype) perl.should_invoke [htype] +# define SHOULD_INVOKE(htype) \ + ( (htype) == HOOK_INIT \ + || (htype) == HOOK_DESTROY \ + || (htype) == HOOK_REFRESH_BEGIN \ + || (htype) == HOOK_REFRESH_END \ + || perl.should_invoke [htype]) # define HOOK_INVOKE(args) rxvt_perl.invoke args #include "rxvt.h" enum data_type { - DT_END, + DT_END, // no further arguments DT_INT, DT_LONG, - DT_STR, - DT_STR_LEN, - DT_WCS_LEN, + DT_STR, // 0-terminates string + DT_STR_LEN, // string + length + DT_WCS_LEN, // wstring + length DT_XEVENT, }; -- 2.34.1