--- rxvt-unicode/src/rxvtperl.xs 2012/06/04 16:03:33 1.162 +++ rxvt-unicode/src/rxvtperl.xs 2012/06/05 11:00:40 1.166 @@ -802,7 +802,7 @@ const_iv (XIMVisibleToForward), const_iv (XIMVisibleToBackword), const_iv (XIMVisibleToCenter), -#if HAVE_XRENDER +#if XRENDER const_iv (PictStandardARGB32), const_iv (PictStandardRGB24), const_iv (PictStandardA8), @@ -980,7 +980,19 @@ void rxvt_term::set_should_invoke (int htype, int inc) CODE: - THIS->perl.should_invoke [htype] += inc; + uint8_t &count = THIS->perl.should_invoke [htype]; + uint8_t prev = count; + count += inc; + if (!prev != !count) + { + // hook status changed, react + switch (htype) + { + case HOOK_POSITION_CHANGE: + if (count) + THIS->get_window_origin (THIS->parent_x, THIS->parent_y); + } + } int rxvt_term::grab_button (int button, U32 modifiers, Window window = THIS->vt) @@ -1247,10 +1259,17 @@ OUTPUT: RETVAL -Window -rxvt_term::vt () +int +rxvt_term::parent_x () + CODE: + RETVAL = THIS->parent_x; + OUTPUT: + RETVAL + +int +rxvt_term::parent_y () CODE: - RETVAL = THIS->vt; + RETVAL = THIS->parent_y; OUTPUT: RETVAL @@ -1936,6 +1955,16 @@ ############################################################################# # fancy bg bloatstuff (TODO: should be moved up somewhere) +# TODO: ugly +void +rxvt_term::get_geometry () + PPCODE: + EXTEND (SP, 4); + PUSHs (sv_2mortal (newSViv (THIS->parent_x))); + PUSHs (sv_2mortal (newSViv (THIS->parent_y))); + PUSHs (sv_2mortal (newSViv (THIS->szHint.width))); + PUSHs (sv_2mortal (newSViv (THIS->szHint.height))); + #if HAVE_IMG rxvt_img * @@ -2099,9 +2128,6 @@ rxvt_img::clone () rxvt_img * -rxvt_img::scale (int new_width, int new_height) - -rxvt_img * rxvt_img::transform (int new_width, int new_height, int repeat, NV p11, NV p12, NV p13, NV p21, NV p22, NV p23, NV p31, NV p32, NV p33) INIT: double matrix[9] = { @@ -2111,5 +2137,11 @@ }; C_ARGS: new_width, new_height, repeat, matrix +rxvt_img * +rxvt_img::scale (int new_width, int new_height) + +rxvt_img * +rxvt_img::rotate (int new_width, int new_height, int repeat, int x, int y, NV phi) + #endif