From: root
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,