diff -Naur emacs.orig/lisp/frame.el emacs.new/lisp/frame.el
--- emacs.orig/lisp/frame.el	2008-02-14 16:16:36.000000000 -0500
+++ emacs.new/lisp/frame.el	2008-03-13 07:10:40.000000000 -0400
@@ -1079,6 +1079,17 @@
   (modify-frame-parameters (selected-frame)
 			   (list (cons 'border-color color-name))))
 
+  (defun set-alpha (alpha &optional frame)
+    "Set the opacity of FRAME to ALPHA.  First argument ALPHA 
+should range from 0 (invisible) to 100 (completely opaque).
+You can also use an floating point number 0.0 to 1.0.
+When called interactively, prompt for the value of the opacity to set.
+FRAME defaults to the selected frame.  To get the frame's current
+alpha value state, use `frame-parameters'."
+    (interactive "XWindow Opacity (0-100 or 0.0-1.0) : ")
+    (modify-frame-parameters frame
+                             (list (cons 'alpha alpha))))
+
 (defun auto-raise-mode (arg)
   "Toggle whether or not the selected frame should auto-raise.
 With arg, turn auto-raise mode on if and only if arg is positive.
diff -Naur emacs.orig/src/frame.c emacs.new/src/frame.c
--- emacs.orig/src/frame.c	2008-02-11 23:03:16.000000000 -0500
+++ emacs.new/src/frame.c	2008-03-13 07:10:40.000000000 -0400
@@ -67,6 +67,12 @@
 
 Lisp_Object Vx_resource_class;
 
+#ifdef HAVE_X_WINDOWS
+/* Lower limit value of frame transparency.  */
+
+Lisp_Object Vframe_alpha_lower_limit;
+#endif
+
 #endif
 
 Lisp_Object Qframep, Qframe_live_p;
@@ -120,6 +126,9 @@
 #ifdef USE_FONT_BACKEND
 Lisp_Object Qfont_backend;
 #endif	/* USE_FONT_BACKEND */
+#ifdef HAVE_X_WINDOWS
+Lisp_Object Qalpha;
+#endif
 
 Lisp_Object Qinhibit_face_set_after_frame_default;
 Lisp_Object Qface_set_after_frame_default;
@@ -2855,6 +2864,9 @@
   {"right-fringe",		&Qright_fringe},
   {"wait-for-wm",		&Qwait_for_wm},
   {"fullscreen",                &Qfullscreen},
+#ifdef HAVE_X_WINDOWS
+  {"alpha",			 &Qalpha},
+#endif
 #ifdef USE_FONT_BACKEND
   {"font-backend",		&Qfont_backend}
 #endif	/* USE_FONT_BACKEND */
@@ -3699,6 +3711,63 @@
     return Qnil;
 }
 
+#ifdef HAVE_X_WINDOWS
+void
+x_set_alpha (f, arg, oldval)
+     struct frame *f;
+     Lisp_Object arg, oldval;
+{
+  double alpha = 1.0;
+  double newval[2];
+  int i, ialpha;
+  Lisp_Object item;
+
+  for( i=0; i<2; i++ )
+    newval[i] = 1.0;
+
+  for( i=0; i<2; i++ )
+    {
+      if( CONSP (arg) )
+        {
+          item = CAR (arg);
+          arg  = CDR (arg);
+        }
+      else
+        item=arg;
+
+      if( !NILP (item) )
+        {
+          if( FLOATP(item) )
+            {
+              alpha = XFLOAT_DATA (item);
+              if ( alpha < 0.0 || 1.0 < alpha )
+                args_out_of_range (make_float (0.0), make_float (1.0));
+            }
+          else if( INTEGERP(item) )
+            {
+              ialpha = XINT (item);
+              if ( ialpha < 0 || 100 < ialpha )
+                args_out_of_range (make_number (0), make_number (100));
+              else
+                alpha = ialpha / 100.0;
+            }
+          else
+            wrong_type_argument (Qnumberp, item);
+        }
+      newval[i]=alpha;
+    }
+
+  for ( i=0; i<2; i++ )
+    f->alpha[i] = newval[i];
+
+  BLOCK_INPUT;
+  x_set_frame_alpha (f);
+  UNBLOCK_INPUT;
+
+  return;
+}
+#endif
+
 
 /* Subroutines of creating an X frame.  */
 
@@ -4468,6 +4537,12 @@
 but binding this variable locally around a call to `x-get-resource'
 is a reasonable practice.  See also the variable `x-resource-name'.  */);
   Vx_resource_class = build_string (EMACS_CLASS);
+
+#ifdef HAVE_X_WINDOWS
+  DEFVAR_LISP ("frame-alpha-lower-limit", &Vframe_alpha_lower_limit,
+    doc: /* Lower limit of alpha value of frame.  */);
+  Vframe_alpha_lower_limit = make_number (20);
+#endif
 #endif
 
   DEFVAR_LISP ("default-frame-alist", &Vdefault_frame_alist,
diff -Naur emacs.orig/src/frame.h emacs.new/src/frame.h
--- emacs.orig/src/frame.h	2008-02-22 12:42:08.000000000 -0500
+++ emacs.new/src/frame.h	2008-03-13 07:10:40.000000000 -0400
@@ -204,6 +204,11 @@
      be used for output.  */
   unsigned glyphs_initialized_p : 1;
 
+#ifdef HAVE_X_WINDOWS
+  /* Opacity of the Frame  */
+  double alpha[2];
+#endif
+
   /* Set to non-zero in change_frame_size when size of frame changed
      Clear the frame in clear_garbaged_frames if set.  */
   unsigned resized_p : 1;
@@ -1021,6 +1026,9 @@
 extern Lisp_Object Qwait_for_wm;
 extern Lisp_Object Qfullscreen;
 extern Lisp_Object Qfont_backend;
+#ifdef HAVE_X_WINDOWS
+extern Lisp_Object Qalpha;
+#endif
 
 extern Lisp_Object Qleft_fringe, Qright_fringe;
 extern Lisp_Object Qheight, Qwidth;
@@ -1100,6 +1108,10 @@
 
 extern int x_figure_window_size P_ ((struct frame *, Lisp_Object, int));
 
+#if defined (HAVE_X_WINDOWS) || defined (HAVE_CARBON)
+extern Lisp_Object Vframe_alpha_lower_limit;
+extern void x_set_alpha P_ ((struct frame *, Lisp_Object, Lisp_Object));
+#endif
 
 extern void validate_x_resource_name P_ ((void));
 
diff -Naur emacs.orig/src/xfns.c emacs.new/src/xfns.c
--- emacs.orig/src/xfns.c	2008-02-22 12:42:05.000000000 -0500
+++ emacs.new/src/xfns.c	2008-03-13 07:10:40.000000000 -0400
@@ -585,6 +585,8 @@
 							     Lisp_Object,
 							     char *, char *,
 							     int));
+extern void x_set_frame_alpha P_ ((struct frame *));
+
 
 
 /* Store the screen positions of frame F into XPTR and YPTR.
@@ -3578,6 +3580,8 @@
   x_default_parameter (f, parms, Qscroll_bar_width, Qnil,
 		       "scrollBarWidth", "ScrollBarWidth",
 		       RES_TYPE_NUMBER);
+  x_default_parameter (f, parms, Qalpha, Qnil,
+		       "alpha", "Alpha", RES_TYPE_NUMBER);
 
   /* Dimensions, especially FRAME_LINES (f), must be done via change_frame_size.
      Change will not be effected unless different from the current
@@ -5991,6 +5995,9 @@
   x_set_fringe_width,
   x_set_wait_for_wm,
   x_set_fullscreen,
+#ifdef HAVE_X_WINDOWS
+   x_set_alpha,
+#endif
 #ifdef USE_FONT_BACKEND
   x_set_font_backend
 #endif	/* USE_FONT_BACKEND */
diff -Naur emacs.orig/src/xterm.c emacs.new/src/xterm.c
--- emacs.orig/src/xterm.c	2008-03-11 11:54:05.000000000 -0400
+++ emacs.new/src/xterm.c	2008-03-13 07:10:40.000000000 -0400
@@ -1018,6 +1018,66 @@
   return FONT_TYPE_UNKNOWN;
 }
 
+#define OPAQUE  0xffffffff
+#define OPACITY "_NET_WM_WINDOW_OPACITY"
+
+void
+x_set_frame_alpha (f)
+     struct frame *f;
+{
+  struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+  Display *dpy = FRAME_X_DISPLAY (f);
+  Window win = FRAME_OUTER_WINDOW (f);
+  if (FRAME_X_DISPLAY_INFO (f)->root_window != FRAME_X_OUTPUT (f)->parent_desc)
+    /* Since the WM decoration lies under the FRAME_OUTER_WINDOW,
+       we must treat the former instead of the latter. */
+    win = FRAME_X_OUTPUT(f)->parent_desc;
+
+  double alpha = 1.0, alpha_lower_limit = 1.0;
+
+  if (dpyinfo->x_highlight_frame == f)
+    alpha = f->alpha[0];
+  else
+    alpha = f->alpha[1];
+
+  if( FLOATP(Vframe_alpha_lower_limit) )
+    alpha_lower_limit = XFLOAT_DATA (Vframe_alpha_lower_limit);
+  else if( INTEGERP(Vframe_alpha_lower_limit) )
+    alpha_lower_limit = ( XINT (Vframe_alpha_lower_limit) ) / 100.0;
+
+  if( alpha < 0.0 || 1.0 < alpha ) alpha = 1.0;
+  if ( 0.0 <= alpha && alpha < alpha_lower_limit && alpha_lower_limit < 1.0)
+    alpha = alpha_lower_limit;
+
+  unsigned int opac = (unsigned int)(alpha * OPAQUE);
+
+  /* return unless necessary */
+  {
+    unsigned char *data;
+    Atom actual;
+    int format;
+    unsigned long n, left;
+
+    XGetWindowProperty(dpy, win, XInternAtom(dpy, OPACITY, False),
+		       0L, 1L, False, XA_CARDINAL, &actual, &format, &n, &left,
+		       (unsigned char **) &data);
+    if (data != None)
+      if (*(unsigned int *)data == opac)
+	{
+	  XFree ((void *) data);
+	  return;
+	}
+      else
+       {
+	  XFree ((void *) data);
+       }
+  }
+
+  XChangeProperty (dpy, win, XInternAtom (dpy, OPACITY, False),
+		   XA_CARDINAL, 32, PropModeReplace,
+		   (unsigned char *) &opac, 1L);
+  XSync (dpy, False);
+}
 
 
 /***********************************************************************
@@ -3468,6 +3528,7 @@
 		    f->output_data.x->border_pixel);
   UNBLOCK_INPUT;
   x_update_cursor (f, 1);
+  x_set_frame_alpha (f);
 }
 
 static void
@@ -3483,6 +3544,7 @@
 			  f->output_data.x->border_tile);
   UNBLOCK_INPUT;
   x_update_cursor (f, 1);
+  x_set_frame_alpha (f);
 }
 
 /* The focus has changed.  Update the frames as necessary to reflect
