From: root Date: Sat, 11 Feb 2006 02:28:19 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=b1efcd99a99eec45bf1871bd3be9d65b9e770c5c;p=dana%2Furxvt.git *** empty log message *** --- diff --git a/Changes b/Changes index c5bc377a..90d624f1 100644 --- a/Changes +++ b/Changes @@ -13,6 +13,10 @@ WISH: anyevent mouse notification / manage MotionMask better. WISH: http://www120.pair.com/mccarthy/nextstep/intro.htmld/Workspace.html is the correct nextstep look. DUMB: support tex fonts + - improve property handling for -pe tabbed: avoid unneecssary property + changes (for kde's benefit) at the expense of extra round-trips, + improve size hint setting. + 7.6 Fri Feb 10 08:52:36 CET 2006 - changed interpretation of [alpha] colour prefix. - +option now really sets the option to default, instead of using the diff --git a/src/hookinc.h b/src/hookinc.h index 33e910f3..ae8815a4 100644 --- a/src/hookinc.h +++ b/src/hookinc.h @@ -41,6 +41,7 @@ def (WM_DELETE_WINDOW) def (WM_PROTOCOLS) def (PROPERTY_NOTIFY) + def (RESIZE_ALL_WINDOWS) def (XIM_PREEDIT_START) def (XIM_PREEDIT_DONE) diff --git a/src/main.C b/src/main.C index 9575f5b8..e0adece7 100644 --- a/src/main.C +++ b/src/main.C @@ -706,9 +706,9 @@ rxvt_term::window_calc (unsigned int newwidth, unsigned int newheight) window_vt_x += sb_w; } - szHint.width_inc = fwidth; + szHint.width_inc = fwidth; szHint.height_inc = fheight; - szHint.min_width = szHint.base_width + szHint.width_inc; + szHint.min_width = szHint.base_width + szHint.width_inc; szHint.min_height = szHint.base_height + szHint.height_inc; if (newwidth && newwidth - szHint.base_width < max_width) @@ -1035,7 +1035,9 @@ rxvt_term::resize_all_windows (unsigned int newwidth, unsigned int newheight, in int old_height = szHint.height; window_calc (newwidth, newheight); - XSetWMNormalHints (dpy, parent[0], &szHint); + + if (!HOOK_INVOKE ((this, HOOK_RESIZE_ALL_WINDOWS, DT_INT, newwidth, DT_INT, newheight, DT_END))) + XSetWMNormalHints (dpy, parent[0], &szHint); if (!ignoreparent) { diff --git a/src/perl/tabbed b/src/perl/tabbed index 100b4b9c..179fa092 100644 --- a/src/perl/tabbed +++ b/src/perl/tabbed @@ -86,6 +86,12 @@ sub configure { ); } +sub on_resize_all_windows { + my ($self, $width, $height) = @_; + + 1 +} + sub copy_properties { my ($self) = @_; my $tab = $self->{cur}; @@ -105,12 +111,17 @@ sub copy_properties { if ($atom == $wm_normal_hints) { my (@hints) = unpack "l!*", $items; - + $hints[$_] += $self->{tabheight} for (4, 6, 16); - + $items = pack "l!*", @hints; } - $self->XChangeWindowProperty ($self->parent, $atom, $type, $format, $items); + + my ($dtype, $dformat, $ditems) = $self->XGetWindowProperty ($self->parent, $atom); + + if ($dtype != $type or $dformat != $format or $ditems ne $items) { + $self->XChangeWindowProperty ($self->parent, $atom, $type, $format, $items); + } } $self->XDeleteProperty ($self->parent, $_) for keys %our_props; diff --git a/src/rxvtperl.xs b/src/rxvtperl.xs index b5e49ea9..aa481a7b 100644 --- a/src/rxvtperl.xs +++ b/src/rxvtperl.xs @@ -1814,7 +1814,6 @@ rxvt_term::XChangeWindowProperty (Window window, Atom property, Atom type, int f XChangeProperty (THIS->dpy, window, property, type, format, PropModeReplace, (unsigned char *)data_, len / elemsize); - XSync (THIS->dpy, 0); } Atom diff --git a/src/urxvt.pm b/src/urxvt.pm index 8b11b787..df0eb0b5 100644 --- a/src/urxvt.pm +++ b/src/urxvt.pm @@ -555,6 +555,12 @@ resource in the @@RXVT_NAME@@(1) manpage). The event is simply the action string. This interface is assumed to change slightly in the future. +=item on_resize_all_windows $tern, $new_width, $new_height + +Called just after the new window size has been calculcated, but before +windows are actually being resized or hints are being set. If this hook +returns TRUE, setting of the window hints is being skipped. + =item on_x_event $term, $event Called on every X event received on the vt window (and possibly other