From: root Date: Sun, 20 Feb 2005 19:45:30 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=a3b70d56349af61d8ad74599be25079ea8001e21;p=dana%2Furxvt.git *** empty log message *** --- diff --git a/Changes b/Changes index 98361466..7d950557 100644 --- a/Changes +++ b/Changes @@ -14,6 +14,7 @@ WISH: just for fun, do shade and tint with XRender. - use XmbSetWMProperties instead of XSetWMProperties. - properly update WM_LOCALE. + - implement _NET_WM_PING protocol. 5.2 Sun Feb 20 01:48:59 CET 2005 - new option -pty-fd that makes the terminal a slave diff --git a/README.configure b/README.configure index 7f41bebc..1de9eb76 100644 --- a/README.configure +++ b/README.configure @@ -179,10 +179,10 @@ CONFIGURE OPTIONS (possibly in combination with other switches) is: MWM-hints + EWMH-hints (pid, utf8 names) and protocols (ping) seperate underline colour settable border widths and borderless switch settable extra linespacing - extra window properties (e.g. UTF-8 window names and PID) iso-14755-2 and -3, and visual feedback backindex and forwardindex escape sequence window op and locale change escape sequences diff --git a/doc/rxvt.7.html b/doc/rxvt.7.html index eeb409e6..fd1d75ac 100644 --- a/doc/rxvt.7.html +++ b/doc/rxvt.7.html @@ -2773,10 +2773,10 @@ in combination with other switches) is:

   MWM-hints
+  EWMH-hints (pid, utf8 names) and protocols (ping)
   seperate underline colour
   settable border widths and borderless switch
   settable extra linespacing
-  extra window properties (e.g. UTF-8 window names and PID)
   iso-14755-2 and -3, and visual feedback
   backindex and forwardindex escape sequence
   window op and locale change escape sequences
diff --git a/doc/rxvt.7.man.in b/doc/rxvt.7.man.in
index dc3c56d3..bd72ccdb 100644
--- a/doc/rxvt.7.man.in
+++ b/doc/rxvt.7.man.in
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "rxvt 7"
-.TH rxvt 7 "2005-02-18" "5.2" "RXVT-UNICODE"
+.TH rxvt 7 "2005-02-20" "5.2" "RXVT-UNICODE"
 .SH "NAME"
 RXVT REFERENCE \- FAQ, command sequences and other background information
 .SH "SYNOPSIS"
@@ -2346,10 +2346,10 @@ in combination with other switches) is:
 .Sp
 .Vb 12
 \&  MWM-hints
+\&  EWMH-hints (pid, utf8 names) and protocols (ping)
 \&  seperate underline colour
 \&  settable border widths and borderless switch
 \&  settable extra linespacing
-\&  extra window properties (e.g. UTF-8 window names and PID)
 \&  iso-14755-2 and -3, and visual feedback
 \&  backindex and forwardindex escape sequence
 \&  window op and locale change escape sequences
diff --git a/doc/rxvt.7.pod b/doc/rxvt.7.pod
index 92efaa86..c02aff7c 100644
--- a/doc/rxvt.7.pod
+++ b/doc/rxvt.7.pod
@@ -2370,10 +2370,10 @@ A non-exhaustive list of features enabled by C<--enable-frills> (possibly
 in combination with other switches) is:
 
   MWM-hints
+  EWMH-hints (pid, utf8 names) and protocols (ping)
   seperate underline colour
   settable border widths and borderless switch
   settable extra linespacing
-  extra window properties (e.g. UTF-8 window names and PID)
   iso-14755-2 and -3, and visual feedback
   backindex and forwardindex escape sequence
   window op and locale change escape sequences
diff --git a/doc/rxvt.7.txt b/doc/rxvt.7.txt
index df23a311..dc4c4d0d 100644
--- a/doc/rxvt.7.txt
+++ b/doc/rxvt.7.txt
@@ -1824,10 +1824,10 @@ CONFIGURE OPTIONS
         (possibly in combination with other switches) is:
 
           MWM-hints
+          EWMH-hints (pid, utf8 names) and protocols (ping)
           seperate underline colour
           settable border widths and borderless switch
           settable extra linespacing
-          extra window properties (e.g. UTF-8 window names and PID)
           iso-14755-2 and -3, and visual feedback
           backindex and forwardindex escape sequence
           window op and locale change escape sequences
diff --git a/reconf b/reconf
index f054dc26..7d1e4d55 100755
--- a/reconf
+++ b/reconf
@@ -3,6 +3,13 @@
 # this is the configure script I use. It represents most of the features I
 # support and is a good baseline :)
 
+# just set some compiler options
+if [ "x$HOSTNAME" = xcerebro -o "x$HOSTNAME" = xfuji ]; then
+   CC=ccache\ gcc-3.4
+   CXX=ccache\ g++-3.4
+   export CC CXX
+fi
+
 ./configure --prefix=/opt/rxvt --enable-utmp \
             --enable-wtmp --enable-lastlog --disable-strings --enable-xim \
             --disable-keepscrolling --enable-xft --enable-mousewheel \
diff --git a/src/command.C b/src/command.C
index 0523e011..f9249cb5 100644
--- a/src/command.C
+++ b/src/command.C
@@ -1332,12 +1332,19 @@ rxvt_term::x_cb (XEvent &ev)
 
       case ClientMessage:
         if (ev.xclient.format == 32
-            && ev.xclient.message_type == xa[XA_WM_PROTOCOLS]
-            && ev.xclient.data.l[0] == xa[XA_WM_DELETE_WINDOW])
-           destroy ();
+            && ev.xclient.message_type == xa[XA_WM_PROTOCOLS])
+          {
+            if (ev.xclient.data.l[0] == xa[XA_WM_DELETE_WINDOW])
+              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);
+#endif
+          }
 #if ENABLE_XEMBED
-        else if (ev.xclient.format == 32
-                 && ev.xclient.message_type == xa[XA_XEMBED])
+        else if (ev.xclient.format == 32 && ev.xclient.message_type == xa[XA_XEMBED])
           {
             if (ev.xclient.data.l[1] == XEMBED_FOCUS_IN)
               focus_in ();
diff --git a/src/init.C b/src/init.C
index f19da415..203551fc 100644
--- a/src/init.C
+++ b/src/init.C
@@ -187,10 +187,13 @@ const char *const xa_names[] =
     "WM_DELETE_WINDOW",
     "CLIPBOARD",
 #if ENABLE_FRILLS
-    "_NET_WM_PID",
     "_MOTIF_WM_HINTS",
+#endif
+#if ENABLE_EWMH
+    "_NET_WM_PID",
     "_NET_WM_NAME",
     "_NET_WM_ICON_NAME",
+    "_NET_WM_PING",
 #endif
 #if USE_XIM
     "WM_LOCALE_NAME",
@@ -969,9 +972,7 @@ rxvt_term::create_windows (int argc, const char *const *argv)
         }
     }
   else
-    {
-      mwmhints.flags = 0;
-    }
+    mwmhints.flags = 0;
 #endif
 
   /* grab colors before netscape does */
@@ -1038,15 +1039,23 @@ rxvt_term::create_windows (int argc, const char *const *argv)
   XmbSetWMProperties (disp, top, NULL, NULL, (char **)argv, argc,
                       &szHint, &wmHint, &classHint);
 
-  /* Enable delete window protocol */
-  XSetWMProtocols (disp, top, &xa[XA_WM_DELETE_WINDOW], 1);
+  Atom protocols[] = {
+    xa[XA_WM_DELETE_WINDOW],
+#if ENABLE_EWMH
+    xa[XA_NET_WM_PING],
+#endif
+  };
 
-#if ENABLE_FRILLS
+  XSetWMProtocols (disp, top, protocols, sizeof (protocols) / sizeof (protocols[0]));
+
+#if ENABLE_EWMH
   long pid = getpid ();
 
   XChangeProperty (disp, top,
                    xa[XA_NET_WM_PID], XA_CARDINAL, 32,
                    PropModeReplace, (unsigned char *)&pid, 1);
+
+  // _NET_WM_WINDOW_TYPE is NORMAL, which is the default
 #endif
 
   XSelectInput (disp, top,
diff --git a/src/main.C b/src/main.C
index 70dfcec6..e09cfaae 100644
--- a/src/main.C
+++ b/src/main.C
@@ -957,7 +957,7 @@ void
 rxvt_term::set_title (const char *str)
 {
   set_string_property (XA_WM_NAME, str);
-#if ENABLE_FRILLS
+#if ENABLE_EWMH
   set_utf8_property (xa[XA_NET_WM_NAME], str);
 #endif
 }
@@ -966,7 +966,7 @@ void
 rxvt_term::set_icon_name (const char *str)
 {
   set_string_property (XA_WM_ICON_NAME, str);
-#if ENABLE_FRILLS
+#if ENABLE_EWMH
   set_utf8_property (xa[XA_NET_WM_ICON_NAME], str);
 #endif
 }
diff --git a/src/rxvt.h b/src/rxvt.h
index 2d67fa85..e9e3e2d0 100644
--- a/src/rxvt.h
+++ b/src/rxvt.h
@@ -23,8 +23,10 @@
 
 #if ENABLE_FRILLS
 # define ENABLE_XEMBED 1
+# define ENABLE_EWMH   1
 #endif
 
+
 /*
  *****************************************************************************
  * SYSTEM HACKS
@@ -682,10 +684,13 @@ enum {
   XA_WM_DELETE_WINDOW,
   XA_CLIPBOARD,
 #if ENABLE_FRILLS
-  XA_NET_WM_PID,
   XA_MOTIF_WM_HINTS,
+#endif
+#if ENABLE_EWMH
+  XA_NET_WM_PID,
   XA_NET_WM_NAME,
   XA_NET_WM_ICON_NAME,
+  XA_NET_WM_PING,
 #endif
 #if USE_XIM
   XA_WM_LOCALE_NAME,