Mercurial > hg > xemacs-beta
changeset 2747:0882ede40b55
[xemacs-hg @ 2005-04-27 09:01:43 by stephent]
suppress WM decorations <87oec0lhmj.fsf@tleepslib.sk.tsukuba.ac.jp>
author | stephent |
---|---|
date | Wed, 27 Apr 2005 09:01:48 +0000 |
parents | 9ef1181e0f51 |
children | 35e9fad5dd7e |
files | src/ChangeLog src/frame-x.c src/frame.c |
diffstat | 3 files changed, 43 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Tue Apr 26 21:51:39 2005 +0000 +++ b/src/ChangeLog Wed Apr 27 09:01:48 2005 +0000 @@ -1,3 +1,15 @@ +2005-04-27 Stephen J. Turnbull <stephen@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. + 2005-04-12 Stephen J. Turnbull <stephen@xemacs.org> * print.c (stderr_out): Document need to convert arguments.
--- a/src/frame-x.c Tue Apr 26 21:51:39 2005 +0000 +++ b/src/frame-x.c Wed Apr 27 09:01:48 2005 +0000 @@ -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.
--- a/src/frame.c Tue Apr 26 21:51:39 2005 +0000 +++ b/src/frame.c Wed Apr 27 09:01:48 2005 +0000 @@ -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. - -Since the first X frame is created before loading your .emacs file, -you must use the X resource database for that. - -For values specific to the first Emacs frame, see `initial-frame-plist'. +including X Windows' defaults database. + +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 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;