Announcing introspector.el, for examining faces, extents, etc.

Stephen J. Turnbull stephen at xemacs.org
Mon Mar 10 13:50:09 EDT 2008


Vin Shelton writes:
 > 2008/3/9 Steve Youngs <steve at sxemacs.org>:
 > > * Stephen J Turnbull <stephen at xemacs.org> writes:
 > >   > Testing and suggestions would be greatly appreciated.  I think it
 > >   > would be appropriate to put frame-utils in xemacs-base, if we can work
 > >   > out the issues with 21.4.
 > >
 > >  A couple of years back, you patched balloon-help so its frames would be
 > >  undecorated.  I know that patch went into SXEmacs, but I'm not sure if
 > >  it made it into XEmacs 21.4.  I bet you another beer that that patch
 > >  will fix frame-utils for 21.4. :-)
 > 
 > I'll check tomorrow, but I think that patch went in to 21.4.

No, it's not there.  It was a little difficult to find, so here's the
log

2005-04-27  Stephen J. Turnbull  <stephen at xemacs.org>

	Allow suppression of WM decorations.

	* frame-x.c (Qoverride_redirect): New Lisp symbol.
	(syms_of_frame_x): DEFSYMBOL it.
	(x_create_widgets): Maybe set override_redirect property on frame.
	(x_init_frame_1): Parse override-redirect from arguments.
	(default-x-frame-plist): Document usage.

	* frame.c (vars_of_frame): Improve docstring.

and diff:

Index: src/frame.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/frame.c,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -r1.70 -r1.71
--- src/frame.c	2005/04/08 23:11:26	1.70
+++ src/frame.c	2005/04/27 09:01:48	1.71
@@ -3857,23 +3857,23 @@
 
   \(setq default-frame-plist '(width 80 height 55))
 
+Predefined properties are described in `set-frame-properties'.
+
 The properties may be in alist format for backward compatibility
 but you should not rely on this behavior.
 
 These override values given in window system configuration data,
- including X Windows' defaults database.
+including X Windows' defaults database.
 
-Since the first X frame is created before loading your .emacs file,
-you must use the X resource database for that.
+Values for the first Emacs frame are taken from `initial-frame-plist'.
+Since the first X frame is created before loading your .emacs file, you
+may wish use the X resource database to avoid flashing.
 
-For values specific to the first Emacs frame, see `initial-frame-plist'.
 For values specific to the separate minibuffer frame, see
- `minibuffer-frame-plist'.
-
-See also the variables `default-x-frame-plist' and
-`default-tty-frame-plist', which are like `default-frame-plist'
-except that they apply only to X or tty frames, respectively
-\(whereas `default-frame-plist' applies to all types of frames).
+`minibuffer-frame-plist'.  See also the variables `default-x-frame-plist'
+and `default-tty-frame-plist', which are like `default-frame-plist'
+except that they apply only to X or tty frames, respectively \(whereas
+`default-frame-plist' applies to all types of frames).
 */ );
   Vdefault_frame_plist = Qnil;
 
Index: src/frame-x.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/frame-x.c,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -r1.69 -r1.70
--- src/frame-x.c	2005/01/24 23:33:56	1.69
+++ src/frame-x.c	2005/04/27 09:01:48	1.70
@@ -67,6 +67,7 @@
 /* Default properties to use when creating frames.  */
 Lisp_Object Vdefault_x_frame_plist;
 
+Lisp_Object Qoverride_redirect;
 Lisp_Object Qx_resource_name;
 
 static const struct memory_description x_frame_data_description_1 [] = {
@@ -1464,8 +1465,8 @@
   Widget app_shell = XtParent (wmshell);
   Widget ew = FRAME_X_TEXT_WIDGET (f);
 
-/* set the position of the frame's root window now.  When the
-   frame was created, the position was initialized to (0,0). */
+  /* set the position of the frame's root window now.  When the
+     frame was created, the position was initialized to (0,0). */
   {
     struct window *win = XWINDOW (f->root_window);
 
@@ -1770,13 +1771,15 @@
 /* Creates the widgets for a frame.
    lisp_window_id is a Lisp description of an X window or Xt
    widget to parse.
+   parent is a frame to use as the parent.
+   overridep if non-nil says to set the override-redirect setting.
 
    This function does not create or map the windows.  (That is
    done by x_popup_frame().)
  */
 static void
 x_create_widgets (struct frame *f, Lisp_Object lisp_window_id,
-		  Lisp_Object parent)
+		  Lisp_Object parent, Lisp_Object overridep)
 {
   struct device *d = XDEVICE (f->device);
   Visual *visual = DEVICE_X_VISUAL (d);
@@ -1874,6 +1877,12 @@
       XtSetArg (al[ac], XtNcolormap, cmap);    ac++;
     }
 
+  if (!NILP (overridep))
+    {
+      XtSetArg (al[ac], XtNoverrideRedirect, True);    ac++;
+    }
+
+  /* #### maybe we should check for FRAMEP instead? */
   if (!NILP (parent))
     {
       parentwid = FRAME_X_SHELL_WIDGET (XFRAME (parent));
@@ -2085,6 +2094,7 @@
   Lisp_Object device = FRAME_DEVICE (f);
   Lisp_Object lisp_window_id = Fplist_get (props, Qwindow_id, Qnil);
   Lisp_Object popup = Fplist_get (props, Qpopup, Qnil);
+  Lisp_Object overridep = Fplist_get (props, Qoverride_redirect, Qnil);
 
   if (!NILP (popup))
     {
@@ -2109,7 +2119,7 @@
   f->visible = 1;
 
   allocate_x_frame_struct (f);
-  x_create_widgets (f, lisp_window_id, popup);
+  x_create_widgets (f, lisp_window_id, popup, overridep);
 }
 
 static void
@@ -2710,6 +2720,7 @@
 void
 syms_of_frame_x (void)
 {
+  DEFSYMBOL (Qoverride_redirect);
   DEFSYMBOL (Qx_resource_name);
 
   DEFSUBR (Fx_window_id);
@@ -2800,6 +2811,10 @@
 				doing different things (e.g. not asking
 				for positioning, and not iconifying
 				separate from its parent).
+  override-redirect		If non-nil, the frame will not be subject to
+				window-manager control.  In particular, it
+				will lack decorations, for more attractive
+				appearance of balloon help, aka tooltips.
   inter-line-space		Not currently implemented.
   toolbar-shadow-thickness	Thickness of toolbar shadows.
   background-toolbar-color	Color of toolbar background.


==== end of diff ====



More information about the XEmacs-Beta mailing list