*** empty log message ***
authorroot <root>
Fri, 20 Jan 2006 12:16:28 +0000 (12:16 +0000)
committerroot <root>
Fri, 20 Jan 2006 12:16:28 +0000 (12:16 +0000)
src/command.C
src/init.C
src/main.C
src/perl/tabbed
src/rxvtperl.xs
src/urxvt.pm

index 102d09d8cd900a0c8efe848392a0462b3e1a1486..3e8a8c8cce3e4f5311ce6f312f582823a6571019 100644 (file)
@@ -1403,21 +1403,25 @@ rxvt_term::x_cb (XEvent &ev)
         break;
 
       case ClientMessage:
-        if (ev.xclient.format == 32)
+        if (ev.xclient.format == 32
+            && !HOOK_INVOKE ((this, HOOK_CLIENT_MESSAGE, DT_XEVENT, &ev, DT_END)))
           {
             if (ev.xclient.message_type == xa[XA_WM_PROTOCOLS])
               {
-                if (ev.xclient.data.l[0] == xa[XA_WM_DELETE_WINDOW])
+                if (!HOOK_INVOKE ((this, HOOK_WM_PROTOCOLS, DT_XEVENT, &ev, DT_END)))
                   {
-                    if (!HOOK_INVOKE ((this, HOOK_WM_DELETE_WINDOW, DT_XEVENT, ev, DT_END)))
-                      destroy ();
-                  }
+                    if (ev.xclient.data.l[0] == xa[XA_WM_DELETE_WINDOW])
+                      {
+                        if (!HOOK_INVOKE ((this, HOOK_WM_DELETE_WINDOW, DT_XEVENT, &ev, DT_END)))
+                          destroy ();
+                      }
 #if ENABLE_EWMH
-                else if (ev.xclient.data.l[0] == xa[XA_NET_WM_PING])
-                  XSendEvent (disp, ev.xclient.window = display->root,
-                              False, SubstructureRedirectMask | SubstructureNotifyMask,
-                              &ev);
+                    else if (ev.xclient.data.l[0] == xa[XA_NET_WM_PING])
+                      XSendEvent (disp, ev.xclient.window = display->root,
+                                  False, SubstructureRedirectMask | SubstructureNotifyMask,
+                                  &ev);
 #endif
+                  }
               }
 #if ENABLE_XEMBED
             else if (ev.xclient.format == 32 && ev.xclient.message_type == xa[XA_XEMBED])
index 41241b3d2977d03ae9c1cb9f28d61437f2456407..633506de235120e98dcd8c653303366827664b1d 100644 (file)
@@ -343,6 +343,19 @@ rxvt_term::init_resources (int argc, const char *const *argv)
 
   free (r_argv);
 
+#if ENABLE_PERL
+  if (!rs[Rs_perl_ext_1])
+    rs[Rs_perl_ext_1] = "default";
+
+  if ((rs[Rs_perl_ext_1] && *rs[Rs_perl_ext_1])
+      || (rs[Rs_perl_ext_2] && *rs[Rs_perl_ext_2])
+      || (rs[Rs_perl_eval] && *rs[Rs_perl_eval]))
+    {
+      rxvt_perl.init (this);
+      HOOK_INVOKE ((this, HOOK_INIT, DT_END));
+    }
+#endif
+
   /*
    * set any defaults not already set
    */
index d52b140e1d9c269b363cc61273903911a35d104d..c3dceee9e9367474fce6ffe2c48f506fcd1d7a47 100644 (file)
@@ -466,19 +466,6 @@ rxvt_term::init (int argc, const char *const *argv)
   keyboard->register_done ();
 #endif
 
-#if ENABLE_PERL
-  if (!rs[Rs_perl_ext_1])
-    rs[Rs_perl_ext_1] = "default";
-
-  if ((rs[Rs_perl_ext_1] && *rs[Rs_perl_ext_1])
-      || (rs[Rs_perl_ext_2] && *rs[Rs_perl_ext_2])
-      || (rs[Rs_perl_eval] && *rs[Rs_perl_eval]))
-    {
-      rxvt_perl.init (this);
-      HOOK_INVOKE ((this, HOOK_INIT, DT_END));
-    }
-#endif
-
 #ifdef HAVE_SCROLLBARS
   if (OPTION (Opt_scrollBar))
     scrollBar.setIdle ();    /* set existence for size calculations */
index 2f72534951ff2d0ee40f4b31913afba70a46871b..0bd7c868c23e9b8c3b3ce308584c60e7e03f7680 100644 (file)
@@ -72,6 +72,10 @@ sub make_current {
 
    $self->configure;
 
+   for my $atom ($tab->XListProperties ($tab->parent)) {
+      warn "$atom\n";
+   }
+
    $tab->XMapWindow ($tab->parent);
 
    $self->refresh;
index 84f42203c01506519893bc3f8832d8265046819f..947feea7bdb72d80110dc4a72328d90ae93fcf2e 100644 (file)
@@ -641,6 +641,16 @@ rxvt_perl_interp::invoke (rxvt_term *term, hook_type htype, ...)
                           }
 
                         break;
+
+                      case ClientMessage:
+                        setuv (window,       xe->xclient.window);
+                        setuv (message_type, xe->xclient.message_type);
+                        setuv (format,       xe->xclient.format);
+                        setuv (l0,           xe->xclient.data.l[0]);
+                        setuv (l1,           xe->xclient.data.l[1]);
+                        setuv (l2,           xe->xclient.data.l[2]);
+                        setuv (l3,           xe->xclient.data.l[3]);
+                        setuv (l4,           xe->xclient.data.l[4]);
                     }
 
                   XPUSHs (sv_2mortal (newRV_noinc ((SV *)hv)));
@@ -1065,6 +1075,9 @@ rxvt_term::locale_decode (SV *octets)
 #define TERM_OFFSET_ncol       TERM_OFFSET(ncol)
 #define TERM_OFFSET_focus      TERM_OFFSET(focus)
 #define TERM_OFFSET_mapped     TERM_OFFSET(mapped)
+#define TERM_OFFSET_int_bwidth TERM_OFFSET(int_bwidth)
+#define TERM_OFFSET_ext_bwidth TERM_OFFSET(ext_bwidth)
+#define TERM_OFFSET_lineSpace  TERM_OFFSET(lineSpace)
 #define TERM_OFFSET_saveLines  TERM_OFFSET(saveLines)
 #define TERM_OFFSET_total_rows TERM_OFFSET(total_rows)
 #define TERM_OFFSET_top_row    TERM_OFFSET(top_row)
@@ -1081,6 +1094,9 @@ rxvt_term::width ()
            ncol       = TERM_OFFSET_ncol
            focus      = TERM_OFFSET_focus
            mapped     = TERM_OFFSET_mapped
+           int_bwidth = TERM_OFFSET_int_bwidth
+           ext_bwidth = TERM_OFFSET_ext_bwidth
+           lineSpace  = TERM_OFFSET_lineSpace
            saveLines  = TERM_OFFSET_saveLines
            total_rows = TERM_OFFSET_total_rows
            top_row    = TERM_OFFSET_top_row
@@ -1849,14 +1865,14 @@ iw::new ()
         RETVAL
 
 CHAINED
-iow::start ()
+iw::start ()
        CODE:
         THIS->start ();
         OUTPUT:
         RETVAL
 
 CHAINED
-iow::stop ()
+iw::stop ()
        CODE:
         THIS->stop ();
         OUTPUT:
@@ -1888,7 +1904,7 @@ pw::start (int pid)
         RETVAL
 
 CHAINED
-iow::stop ()
+pw::stop ()
        CODE:
         THIS->stop ();
         OUTPUT:
index de9d4e9892a64f64928860ff796145b3103224da..d028b7cae3a87dc548ee2ecc8c48f5b09e578976 100644 (file)
@@ -493,6 +493,15 @@ output, if any, in locale-specific encoding.
 
 subwindow.
 
+=item on_client_message $term, $event
+
+=item on_wm_protocols $term, $event
+
+=item on_wm_delete_window $term, $event
+
+Called when various types of ClientMessage events are received (all with
+format=32, WM_PROTOCOLS or WM_PROTOCOLS:WM_DELETE_WINDOW).
+
 =back
 
 =cut
@@ -1792,6 +1801,67 @@ Stop watching for events on the given filehandle.
 
 =back
 
+=head2 The C<urxvt::iw> Class
+
+This class implements idle watchers, that get called automatically when
+the process is idle. They should return as fast as possible, after doing
+some useful work.
+
+=over 4
+
+=item $iw = new urxvt::iw
+
+Create a new idle watcher object in stopped state.
+
+=item $iw = $iw->cb (sub { my ($iw) = @_; ... })
+
+Set the callback to be called when the watcher triggers.
+
+=item $timer = $timer->start
+
+Start the watcher.
+
+=item $timer = $timer->stop
+
+Stop the watcher.
+
+=back
+
+=head2 The C<urxvt::pw> Class
+
+This class implements process watchers. They create an event whenever a
+process exits, after which they stop automatically.
+
+   my $pid = fork;
+   ...
+   $term->{pw} = urxvt::pw
+                    ->new
+                    ->start ($pid)
+                    ->cb (sub {
+                       my ($pw, $exit_status) = @_;
+                       ...
+                    });                                                                                                                                      
+
+=over 4
+
+=item $pw = new urxvt::pw
+
+Create a new process watcher in stopped state.
+
+=item $pw = $pw->cb (sub { my ($pw, $exit_status) = @_; ... })
+
+Set the callback to be called when the timer triggers.
+
+=item $pw = $timer->start ($pid)
+
+Tells the wqtcher to start watching for process C<$pid>.
+
+=item $pw = $pw->stop
+
+Stop the watcher.
+
+=back
+
 =head1 ENVIRONMENT
 
 =head2 URXVT_PERL_VERBOSITY