comparison src/frame-x.c @ 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 3d8143fc88e1
children 141c2920ea48
comparison
equal deleted inserted replaced
2746:9ef1181e0f51 2747:0882ede40b55
65 #endif 65 #endif
66 66
67 /* Default properties to use when creating frames. */ 67 /* Default properties to use when creating frames. */
68 Lisp_Object Vdefault_x_frame_plist; 68 Lisp_Object Vdefault_x_frame_plist;
69 69
70 Lisp_Object Qoverride_redirect;
70 Lisp_Object Qx_resource_name; 71 Lisp_Object Qx_resource_name;
71 72
72 static const struct memory_description x_frame_data_description_1 [] = { 73 static const struct memory_description x_frame_data_description_1 [] = {
73 { XD_LISP_OBJECT, offsetof (struct x_frame, last_menubar_buffer) }, 74 { XD_LISP_OBJECT, offsetof (struct x_frame, last_menubar_buffer) },
74 { XD_LISP_OBJECT, offsetof (struct x_frame, icon_pixmap) }, 75 { XD_LISP_OBJECT, offsetof (struct x_frame, icon_pixmap) },
1462 /* #### This may not be an ApplicationShell any more, with the 'popup 1463 /* #### This may not be an ApplicationShell any more, with the 'popup
1463 frame property. */ 1464 frame property. */
1464 Widget app_shell = XtParent (wmshell); 1465 Widget app_shell = XtParent (wmshell);
1465 Widget ew = FRAME_X_TEXT_WIDGET (f); 1466 Widget ew = FRAME_X_TEXT_WIDGET (f);
1466 1467
1467 /* set the position of the frame's root window now. When the 1468 /* set the position of the frame's root window now. When the
1468 frame was created, the position was initialized to (0,0). */ 1469 frame was created, the position was initialized to (0,0). */
1469 { 1470 {
1470 struct window *win = XWINDOW (f->root_window); 1471 struct window *win = XWINDOW (f->root_window);
1471 1472
1472 WINDOW_LEFT (win) = FRAME_LEFT_BORDER_END (f) 1473 WINDOW_LEFT (win) = FRAME_LEFT_BORDER_END (f)
1473 + FRAME_LEFT_GUTTER_BOUNDS (f); 1474 + FRAME_LEFT_GUTTER_BOUNDS (f);
1768 } 1769 }
1769 1770
1770 /* Creates the widgets for a frame. 1771 /* Creates the widgets for a frame.
1771 lisp_window_id is a Lisp description of an X window or Xt 1772 lisp_window_id is a Lisp description of an X window or Xt
1772 widget to parse. 1773 widget to parse.
1774 parent is a frame to use as the parent.
1775 overridep if non-nil says to set the override-redirect setting.
1773 1776
1774 This function does not create or map the windows. (That is 1777 This function does not create or map the windows. (That is
1775 done by x_popup_frame().) 1778 done by x_popup_frame().)
1776 */ 1779 */
1777 static void 1780 static void
1778 x_create_widgets (struct frame *f, Lisp_Object lisp_window_id, 1781 x_create_widgets (struct frame *f, Lisp_Object lisp_window_id,
1779 Lisp_Object parent) 1782 Lisp_Object parent, Lisp_Object overridep)
1780 { 1783 {
1781 struct device *d = XDEVICE (f->device); 1784 struct device *d = XDEVICE (f->device);
1782 Visual *visual = DEVICE_X_VISUAL (d); 1785 Visual *visual = DEVICE_X_VISUAL (d);
1783 int depth = DEVICE_X_DEPTH (d); 1786 int depth = DEVICE_X_DEPTH (d);
1784 Colormap cmap = DEVICE_X_COLORMAP (d); 1787 Colormap cmap = DEVICE_X_COLORMAP (d);
1872 XtSetArg (al[ac], XtNvisual, visual); ac++; 1875 XtSetArg (al[ac], XtNvisual, visual); ac++;
1873 XtSetArg (al[ac], XtNdepth, depth); ac++; 1876 XtSetArg (al[ac], XtNdepth, depth); ac++;
1874 XtSetArg (al[ac], XtNcolormap, cmap); ac++; 1877 XtSetArg (al[ac], XtNcolormap, cmap); ac++;
1875 } 1878 }
1876 1879
1880 if (!NILP (overridep))
1881 {
1882 XtSetArg (al[ac], XtNoverrideRedirect, True); ac++;
1883 }
1884
1885 /* #### maybe we should check for FRAMEP instead? */
1877 if (!NILP (parent)) 1886 if (!NILP (parent))
1878 { 1887 {
1879 parentwid = FRAME_X_SHELL_WIDGET (XFRAME (parent)); 1888 parentwid = FRAME_X_SHELL_WIDGET (XFRAME (parent));
1880 XtSetArg (al[ac], XtNtransientFor, parentwid); ac++; 1889 XtSetArg (al[ac], XtNtransientFor, parentwid); ac++;
1881 } 1890 }
2083 { 2092 {
2084 /* This function can GC */ 2093 /* This function can GC */
2085 Lisp_Object device = FRAME_DEVICE (f); 2094 Lisp_Object device = FRAME_DEVICE (f);
2086 Lisp_Object lisp_window_id = Fplist_get (props, Qwindow_id, Qnil); 2095 Lisp_Object lisp_window_id = Fplist_get (props, Qwindow_id, Qnil);
2087 Lisp_Object popup = Fplist_get (props, Qpopup, Qnil); 2096 Lisp_Object popup = Fplist_get (props, Qpopup, Qnil);
2097 Lisp_Object overridep = Fplist_get (props, Qoverride_redirect, Qnil);
2088 2098
2089 if (!NILP (popup)) 2099 if (!NILP (popup))
2090 { 2100 {
2091 if (EQ (popup, Qt)) 2101 if (EQ (popup, Qt))
2092 popup = Fselected_frame (device); 2102 popup = Fselected_frame (device);
2107 * frame properties. 2117 * frame properties.
2108 */ 2118 */
2109 f->visible = 1; 2119 f->visible = 1;
2110 2120
2111 allocate_x_frame_struct (f); 2121 allocate_x_frame_struct (f);
2112 x_create_widgets (f, lisp_window_id, popup); 2122 x_create_widgets (f, lisp_window_id, popup, overridep);
2113 } 2123 }
2114 2124
2115 static void 2125 static void
2116 x_init_frame_2 (struct frame *f, Lisp_Object UNUSED (props)) 2126 x_init_frame_2 (struct frame *f, Lisp_Object UNUSED (props))
2117 { 2127 {
2708 /************************************************************************/ 2718 /************************************************************************/
2709 2719
2710 void 2720 void
2711 syms_of_frame_x (void) 2721 syms_of_frame_x (void)
2712 { 2722 {
2723 DEFSYMBOL (Qoverride_redirect);
2713 DEFSYMBOL (Qx_resource_name); 2724 DEFSYMBOL (Qx_resource_name);
2714 2725
2715 DEFSUBR (Fx_window_id); 2726 DEFSUBR (Fx_window_id);
2716 #ifdef HAVE_CDE 2727 #ifdef HAVE_CDE
2717 DEFSUBR (Fcde_start_drag_internal); 2728 DEFSUBR (Fcde_start_drag_internal);
2798 will make the window manager treat the 2809 will make the window manager treat the
2799 frame as a dialog box, which may entail 2810 frame as a dialog box, which may entail
2800 doing different things (e.g. not asking 2811 doing different things (e.g. not asking
2801 for positioning, and not iconifying 2812 for positioning, and not iconifying
2802 separate from its parent). 2813 separate from its parent).
2814 override-redirect If non-nil, the frame will not be subject to
2815 window-manager control. In particular, it
2816 will lack decorations, for more attractive
2817 appearance of balloon help, aka tooltips.
2803 inter-line-space Not currently implemented. 2818 inter-line-space Not currently implemented.
2804 toolbar-shadow-thickness Thickness of toolbar shadows. 2819 toolbar-shadow-thickness Thickness of toolbar shadows.
2805 background-toolbar-color Color of toolbar background. 2820 background-toolbar-color Color of toolbar background.
2806 bottom-toolbar-shadow-color Color of bottom shadows on toolbars. 2821 bottom-toolbar-shadow-color Color of bottom shadows on toolbars.
2807 (*Not* specific to the bottom-toolbar.) 2822 (*Not* specific to the bottom-toolbar.)