From: root Date: Wed, 18 Jan 2006 10:31:37 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=bebf32c703f7d9992e564400302644ab494f5ae5;p=dana%2Furxvt.git *** empty log message *** --- diff --git a/src/command.C b/src/command.C index b303e893..0a4e46c8 100644 --- a/src/command.C +++ b/src/command.C @@ -1504,6 +1504,8 @@ rxvt_term::x_cb (XEvent &ev) resize_all_windows (ev.xconfigure.width, ev.xconfigure.height, 1); } + HOOK_INVOKE ((this, HOOK_CONFIGURE_NOTIFY, DT_XEVENT, &ev, DT_END)); + #ifdef TRANSPARENT /* XXX: maybe not needed - leave in for now */ if (OPTION (Opt_transparent)) check_our_parents (); diff --git a/src/hookinc.h b/src/hookinc.h index 18d1ca40..d0814249 100644 --- a/src/hookinc.h +++ b/src/hookinc.h @@ -34,4 +34,5 @@ def (MOTION_NOTIFY) def (MAP_NOTIFY) def (UNMAP_NOTIFY) + def (CONFIGURE_NOTIFY) def (CUSTOM_REND) // hovering over custom rendition, generate enter/leave maybe? diff --git a/src/perl/selection-pastebin b/src/perl/selection-pastebin index 731dcff5..5bb7ab5d 100644 --- a/src/perl/selection-pastebin +++ b/src/perl/selection-pastebin @@ -16,7 +16,8 @@ sub upload_paste { my $msg = "uploaded $filename"; - if (open my $o, ">" . $tmpfile) { + if (open my $o, ">$tmpfile") { + chmod 0644, $tmpfile; print $o $txt; close $o; } else { diff --git a/src/rxvtperl.xs b/src/rxvtperl.xs index 75b840b5..60fcd562 100644 --- a/src/rxvtperl.xs +++ b/src/rxvtperl.xs @@ -537,6 +537,7 @@ rxvt_perl_interp::invoke (rxvt_term *term, hook_type htype, ...) # define set(name, sv) hv_store (hv, # name, sizeof (# name) - 1, sv, 0) # define setiv(name, val) hv_store (hv, # name, sizeof (# name) - 1, newSViv (val), 0) +# define setuv(name, val) hv_store (hv, # name, sizeof (# name) - 1, newSVuv (val), 0) # undef set setiv (type, xe->type); @@ -550,31 +551,54 @@ rxvt_perl_interp::invoke (rxvt_term *term, hook_type htype, ...) case ButtonPress: case ButtonRelease: case MotionNotify: - setiv (time, xe->xmotion.time); - setiv (x, xe->xmotion.x); - setiv (y, xe->xmotion.y); - setiv (row, xe->xmotion.y / term->fheight); - setiv (col, xe->xmotion.x / term->fwidth); - setiv (x_root, xe->xmotion.x_root); - setiv (y_root, xe->xmotion.y_root); - setiv (state, xe->xmotion.state); - break; - } + setuv (window, xe->xmotion.window); + setuv (root, xe->xmotion.root); + setuv (subwindow, xe->xmotion.subwindow); + setuv (time, xe->xmotion.time); + setiv (x, xe->xmotion.x); + setiv (y, xe->xmotion.y); + setiv (row, xe->xmotion.y / term->fheight); + setiv (col, xe->xmotion.x / term->fwidth); + setiv (x_root, xe->xmotion.x_root); + setiv (y_root, xe->xmotion.y_root); + setuv (state, xe->xmotion.state); + + switch (xe->type) + { + case KeyPress: + case KeyRelease: + setuv (keycode, xe->xkey.keycode); + break; + + case ButtonPress: + case ButtonRelease: + setuv (button, xe->xbutton.button); + break; + + case MotionNotify: + setiv (is_hint, xe->xmotion.is_hint); + break; + } - switch (xe->type) - { - case KeyPress: - case KeyRelease: - setiv (keycode, xe->xkey.keycode); break; - case ButtonPress: - case ButtonRelease: - setiv (button, xe->xbutton.button); - break; + case MapNotify: + case UnmapNotify: + case ConfigureNotify: + setuv (event, xe->xconfigure.event); + setuv (window, xe->xconfigure.window); + + switch (xe->type) + { + case ConfigureNotify: + setiv (x, xe->xconfigure.x); + setiv (y, xe->xconfigure.y); + setiv (width, xe->xconfigure.width); + setiv (height, xe->xconfigure.height); + setuv (above, xe->xconfigure.above); + break; + } - case MotionNotify: - setiv (is_hint, xe->xmotion.is_hint); break; } diff --git a/src/urxvt.pm b/src/urxvt.pm index f332a130..2b984c6e 100644 --- a/src/urxvt.pm +++ b/src/urxvt.pm @@ -436,6 +436,8 @@ does focus in processing. Called wheneever the window loses keyboard focus, before rxvt-unicode does focus out processing. +=item on_configure_notify $term, $event + =item on_key_press $term, $event, $keysym, $octets =item on_key_release $term, $event, $keysym