annotate src/EmacsShell.c @ 5043:d0c14ea98592

various frame-geometry fixes -------------------- ChangeLog entries follow: -------------------- src/ChangeLog addition: 2010-02-15 Ben Wing <ben@xemacs.org> * EmacsFrame.c: * EmacsFrame.c (EmacsFrameResize): * console-msw-impl.h: * console-msw-impl.h (struct mswindows_frame): * console-msw-impl.h (FRAME_MSWINDOWS_TARGET_RECT): * device-tty.c: * device-tty.c (tty_asynch_device_change): * event-msw.c: * event-msw.c (mswindows_wnd_proc): * faces.c (Fface_list): * faces.h: * frame-gtk.c: * frame-gtk.c (gtk_set_initial_frame_size): * frame-gtk.c (gtk_set_frame_size): * frame-msw.c: * frame-msw.c (mswindows_init_frame_1): * frame-msw.c (mswindows_set_frame_size): * frame-msw.c (mswindows_size_frame_internal): * frame-msw.c (msprinter_init_frame_3): * frame.c: * frame.c (enum): * frame.c (Fmake_frame): * frame.c (adjust_frame_size): * frame.c (store_minibuf_frame_prop): * frame.c (Fframe_property): * frame.c (Fframe_properties): * frame.c (Fframe_displayable_pixel_height): * frame.c (Fframe_displayable_pixel_width): * frame.c (internal_set_frame_size): * frame.c (Fset_frame_height): * frame.c (Fset_frame_pixel_height): * frame.c (Fset_frame_displayable_pixel_height): * frame.c (Fset_frame_width): * frame.c (Fset_frame_pixel_width): * frame.c (Fset_frame_displayable_pixel_width): * frame.c (Fset_frame_size): * frame.c (Fset_frame_pixel_size): * frame.c (Fset_frame_displayable_pixel_size): * frame.c (frame_conversion_internal_1): * frame.c (get_frame_displayable_pixel_size): * frame.c (change_frame_size_1): * frame.c (change_frame_size): * frame.c (generate_title_string): * frame.h: * gtk-xemacs.c: * gtk-xemacs.c (gtk_xemacs_size_request): * gtk-xemacs.c (gtk_xemacs_size_allocate): * gtk-xemacs.c (gtk_xemacs_paint): * gutter.c: * gutter.c (update_gutter_geometry): * redisplay.c (end_hold_frame_size_changes): * redisplay.c (redisplay_frame): * toolbar.c: * toolbar.c (update_frame_toolbars_geometry): * window.c: * window.c (frame_pixsize_valid_p): * window.c (check_frame_size): Various fixes to frame geometry to make it a bit easier to understand and fix some bugs. 1. IMPORTANT: Some renamings. Will need to be applied carefully to the carbon repository, in the following order: -- pixel_to_char_size -> pixel_to_frame_unit_size -- char_to_pixel_size -> frame_unit_to_pixel_size -- pixel_to_real_char_size -> pixel_to_char_size -- char_to_real_pixel_size -> char_to_pixel_size -- Reverse second and third arguments of change_frame_size() and change_frame_size_1() to try to make functions consistent in putting width before height. -- Eliminate old round_size_to_char, because it didn't really do anything differently from round_size_to_real_char() -- round_size_to_real_char -> round_size_to_char; any places that called the old round_size_to_char should just call the new one. 2. IMPORTANT FOR CARBON: The set_frame_size() method is now passed sizes in "frame units", like all other frame-sizing functions, rather than some hacked-up combination of char-cell units and total pixel size. This only affects window systems that use "pixelated geometry", and I'm not sure if Carbon is one of them. MS Windows is pixelated, X and GTK are not. For pixelated-geometry systems, the size in set_frame_size() is in displayable pixels rather than total pixels and needs to be converted appropriately; take a look at the changes made to mswindows_set_frame_size() method if necessary. 3. Add a big long comment in frame.c describing how frame geometry works. 4. Remove MS Windows-specific character height and width fields, duplicative and unused. 5. frame-displayable-pixel-* and set-frame-displayable-pixel-* didn't use to work on MS Windows, but they do now. 6. In general, clean up the handling of "pixelated geometry" so that fewer functions have to worry about this. This is really an abomination that should be removed entirely but that will have to happen later. Fix some buggy code in frame_conversion_internal() that happened to "work" because it was countered by oppositely buggy code in change_frame_size(). 7. Clean up some frame-size code in toolbar.c and use functions already provided in frame.c instead of rolling its own. 8. Fix check_frame_size() in window.c, which formerly didn't take pixelated geometry into account.
author Ben Wing <ben@xemacs.org>
date Mon, 15 Feb 2010 22:14:11 -0600
parents 3d8143fc88e1
children 308d34e9f07d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1 /* Emacs shell widget -- glue.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2 Copyright (C) 1994, 1995 Sun Microsystems, Inc.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
3
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
4 This file is part of XEmacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6 XEmacs is free software; you can redistribute it and/or modify it
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7 under the terms of the GNU General Public License as published by the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8 Free Software Foundation; either version 2, or (at your option) any
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
9 later version.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
11 XEmacs is distributed in the hope that it will be useful, but WITHOUT
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
14 for more details.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17 along with XEmacs; see the file COPYING. If not, write to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19 Boston, MA 02111-1307, USA. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21 /* Synched up with: Not in FSF. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23 /* Written by Ben Wing, May, 1994. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
24
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25 #include <config.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27 #include <stdio.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28 #include <assert.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29 #include <stdlib.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30 #include <X11/StringDefs.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31 #include "xintrinsicp.h"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32 #include <X11/Shell.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
33 #include <X11/ShellP.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
34 #include "EmacsShell.h"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35 #include "ExternalShell.h"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
36
2500
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 428
diff changeset
37 #define ABORT abort
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 428
diff changeset
38
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
39 #if 0 /* Not currently used */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
40
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
41 /* The root_geometry_manager() method in Shell.c is fucked up with regard
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
42 to the user-specified-position vs. program-specified-position and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43 user-specified-size vs. program-specified-size flag. (It always
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
44 sets program-specified whenever the program requests a change
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
45 in its size or position, even when this came from direct user
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46 request.) So we provide external entry points to fix this after
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47 the program requested a size or position change. If it turns
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48 out that the user-specified-position flag needs to be set at the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
49 *same* time that the geometry change request is made, then we
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50 will have to duplicate the entire root_geometry_manager() method;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51 but I don't think there are any WM's that require this. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
53 /* junk stolen from IntrinsicI.h */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
54
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
55 extern void _XtAllocError( String /* alloc_type */);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
56
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
57 /* junk ungraciously copied from Shell.c */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
58
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
59 static void ComputeWMSizeHints(w, hints)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
60 WMShellWidget w;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
61 XSizeHints *hints;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
62 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
63 long flags;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
64 hints->flags = flags = w->wm.size_hints.flags;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
65 #define copy(field) hints->field = w->wm.size_hints.field
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
66 if (flags & (USPosition | PPosition)) {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
67 copy(x);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
68 copy(y);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
69 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
70 if (flags & (USSize | PSize)) {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
71 copy(width);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
72 copy(height);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
74 if (flags & PMinSize) {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
75 copy(min_width);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
76 copy(min_height);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
77 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
78 if (flags & PMaxSize) {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
79 copy(max_width);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
80 copy(max_height);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
81 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
82 if (flags & PResizeInc) {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
83 copy(width_inc);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
84 copy(height_inc);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
85 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
86 if (flags & PAspect) {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
87 copy(min_aspect.x);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
88 copy(min_aspect.y);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
89 copy(max_aspect.x);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
90 copy(max_aspect.y);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
91 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
92 #undef copy
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
93 #define copy(field) hints->field = w->wm.field
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94 if (flags & PBaseSize) {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
95 copy(base_width);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
96 copy(base_height);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98 if (flags & PWinGravity)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99 copy(win_gravity);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100 #undef copy
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
102
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
103 static void _SetWMSizeHints(w)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
104 WMShellWidget w;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
105 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
106 XSizeHints *size_hints = XAllocSizeHints();
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
107
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
108 if (size_hints == NULL) _XtAllocError("XAllocSizeHints");
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
109 ComputeWMSizeHints(w, size_hints);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
110 XSetWMNormalHints(XtDisplay((Widget)w), XtWindow((Widget)w), size_hints);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
111 XFree((char*)size_hints);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
112 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
113
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
114 /* end of junk ungraciously copied from Shell.c */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
115
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
116 #endif /* 0 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
117 #if 0 /* Not currently used */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
118
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
119 void
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
120 EmacsShellSetSizeUserSpecified (Widget gw)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
121 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
122 WMShellWidget w = (WMShellWidget) gw;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
123 w->wm.size_hints.flags |= USSize;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
124 w->wm.size_hints.flags &= ~PSize;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
125 if (!w->shell.override_redirect && XtIsRealized (gw))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
126 _SetWMSizeHints (w);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
127 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
128
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
129 void
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
130 EmacsShellSetPositionUserSpecified (Widget gw)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
131 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
132 WMShellWidget w = (WMShellWidget) gw;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
133 w->wm.size_hints.flags |= USPosition;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
134 w->wm.size_hints.flags &= ~PPosition;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
135 if (!w->shell.override_redirect && XtIsRealized (gw))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
136 _SetWMSizeHints (w);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
137 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
138
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
139 #endif /* 0 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
140
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
141 void
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
142 EmacsShellSmashIconicHint (Widget shell, int iconic_p)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
143 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
144 /* See comment in frame-x.c about this */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
145 WMShellWidget wmshell = (WMShellWidget) shell;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
146 assert (XtIsSubclass (shell, wmShellWidgetClass));
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
147 /* old_state = (wmshell->wm.wm_hints.flags & StateHint
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
148 ? wmshell->wm.wm_hints.initial_state
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
149 : NormalState); */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
150 wmshell->wm.wm_hints.flags |= StateHint;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
151 wmshell->wm.wm_hints.initial_state = iconic_p ? IconicState : NormalState;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
152 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
153
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
154 void
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
155 EmacsShellUpdateSizeHints (Widget gw)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
156 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
157 if (XtIsSubclass (gw, topLevelEmacsShellWidgetClass))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
158 TopLevelEmacsShellUpdateSizeHints (gw);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
159 #ifdef EXTERNAL_WIDGET
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
160 else if (XtIsSubclass (gw, externalShellWidgetClass))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
161 /* do what ??? Don't abort! */;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
162 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
163 else if (XtIsSubclass (gw, transientEmacsShellWidgetClass))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
164 TransientEmacsShellUpdateSizeHints (gw);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
165 else
2500
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 428
diff changeset
166 ABORT ();
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
167 }