*** empty log message ***
authorroot <root>
Sun, 15 Jun 2008 14:07:58 +0000 (14:07 +0000)
committerroot <root>
Sun, 15 Jun 2008 14:07:58 +0000 (14:07 +0000)
Changes
src/perl/tabbed
src/rxvtperl.xs
src/urxvt.pm

diff --git a/Changes b/Changes
index 59d58052694ba9f060ca0ea2cbc0857e62ff9262..5ad9c2ab03709efcdb43cf5241245b23507afbf0 100644 (file)
--- a/Changes
+++ b/Changes
@@ -21,23 +21,26 @@ DUMB: support tex fonts
 TODO: rxvt -font 10x20 -xrm "*.tabbed.font: 10x20" -pe tabbed
       how does one affect the tab windows themselves? seems not to work anymore.
 
-TODO: implement initial chdir for tabs by making it a resource?
        - new option --cd/chdir to set the starting working directory.
         - tabbed extension now starts in the "correct" working directory.
-       - work around fedore 9 prividing isastream but not the relevant
+       - work around fedora 9 providing isastream but not the relevant
           header file for it (report by Tuncer Ayaz).
-       - upgrade to libev-3.31, fixing a bug in the select backend
+       - upgrade libev, fixing a bug in the select backend
           with more than 31 file descriptors on non-linux 64 bit systems.
        - correctly reset the multibyte state to the initial one
           after EILSEQ (patch by Neil Booth). This fixes the
           issue of rxvt-unicode not properly displaying text after an illegal
           sequence on NetBSD and probably other systems.
-        - implement ESC [ 3 K as a more rational alternative to ESC [ 0 K.
+        - more intelligent property handling with -pe tabbed, works around
+          broken window managers (kwm et al.), saves bandwidth and should
+          help working window managers as well.
        - made tabs moveable (based on a patch by Petr Machata).
+        - implement ESC [ 3 K as a more rational alternative to ESC [ 0 K.
         - support relative paths for RXVT_SOCKET in urxvtd.
         - better diagnostic on 0x0 window geometries.
-        - update Anyevent API to version 3.4 and above.
+        - update AnyEvent API to version 3.4 and above.
         - document the default value of :0 for DISPLAY.
+        - rename perl method XChangeWindowProperty to XChangeProperty.
 
 9.02 Tue Jan 29 11:58:36 CET 2008
        - the "exg makes everybody happy" release.
index 0f2882f7d5a33faab87f4054ab6f91922fd8e30f..89ec0a9680ad0c897b134554bf80cedaf1c661d5 100644 (file)
@@ -98,17 +98,13 @@ sub copy_properties {
 
    my $wm_normal_hints = $self->XInternAtom ("WM_NORMAL_HINTS");
 
-   my %our_props = map +($_ => undef), $self->XListProperties ($self->parent);
-
-   delete $our_props{$self->XInternAtom ($_)}
-      for qw(WM_STATE WM_ICON_SIZE
-             _NET_WM_VISIBLE_NAME _NET_WM_VISIBLE_ICON_NAME _NET_WM_ICON_GEOMETRY _NET_FRAME_EXTENTS);
+   my $current = delete $self->{current_properties};
 
+   # pass 1: copy over properties different or nonexisting
    for my $atom ($tab->XListProperties ($tab->parent)) {
       my ($type, $format, $items) = $self->XGetWindowProperty ($tab->parent, $atom);
       
-      delete $our_props{$atom};
-
+      # fix up size hints
       if ($atom == $wm_normal_hints) {
          my (@hints) = unpack "l!*", $items;
       
@@ -117,14 +113,17 @@ sub copy_properties {
          $items = pack "l!*", @hints;
       }
 
-      my ($dtype, $dformat, $ditems) = $self->XGetWindowProperty ($self->parent, $atom);
+      my $cur = delete $current->{$atom};
 
-      if ($dtype != $type or $dformat != $format or $ditems ne $items) {
-         $self->XChangeWindowProperty ($self->parent, $atom, $type, $format, $items);
-      }
+      # update if changed, we assume empty items and zero type and format will not happen
+      $self->XChangeProperty ($self->parent, $atom, $type, $format, $items)
+         if $cur->[0] != $type or $cur->[1] != $format or $cur->[2] ne $items;
+
+      $self->{current_properties}{$atom} = [$type, $format, $items];
    }
 
-   $self->XDeleteProperty ($self->parent, $_) for keys %our_props;
+   # pass 2, delete all extraneous properties
+   $self->XDeleteProperty ($self->parent, $_) for keys %$current;
 }
 
 sub make_current {
index 22d759122cdb984199de6c8e8be124b5c0346de9..dfbcdb78eb91da8ff56e7f9a5618e11fe0bd5652 100644 (file)
@@ -1705,7 +1705,7 @@ rxvt_term::XGetWindowProperty (Window window, Atom property)
 }
 
 void
-rxvt_term::XChangeWindowProperty (Window window, Atom property, Atom type, int format, SV *data)
+rxvt_term::XChangeProperty (Window window, Atom property, Atom type, int format, SV *data)
        CODE:
 {
        STRLEN len;
index 2793547f4c8ab71a414f230492bb397882cabf33..523573c12bc4001022fe52545c39f624b5df7ec5 100644 (file)
@@ -1809,7 +1809,7 @@ the session.
 
 =item ($type,$format,$octets) = $term->XGetWindowProperty ($window, $property)
 
-=item $term->XChangeWindowProperty ($window, $property, $type, $format, $octets)
+=item $term->XChangeProperty ($window, $property, $type, $format, $octets)
 
 =item $term->XDeleteProperty ($window, $property)