1
/* Masanao Izumo <mo@goice.co.jp>:
3
* There is problem if both -lXm and -lXaw are linked.
4
* This source code to re-define XAW vendorShell.
5
* To change motif vendorShell to XAW vendorShell in runtime.
7
* #define vendorShellClassRec xaw_vendorShellClassRec
8
* #define vendorShellWidgetClass xaw_vendorShellWidgetClass
9
* #include "xaw_redef.c"
10
* #undef vendorShellClassRec
11
* #undef vendorShellWidgetClass
12
* extern WidgetClass vendorShellWidgetClass;
13
* extern VendorShellClassRec vendorShellClassRec;
14
* static void xaw_vendor_setup(void)
16
* memcpy(&vendorShellClassRec, &xaw_vendorShellClassRec,
17
* sizeof(VendorShellClassRec));
18
* vendorShellWidgetClass = (WidgetClass)&xaw_vendorShellWidgetClass;
22
/* $XConsortium: Vendor.c,v 1.27 94/04/17 20:13:25 kaleb Exp $ */
24
/***********************************************************
26
Copyright (c) 1987, 1988, 1994 X Consortium
28
Permission is hereby granted, free of charge, to any person obtaining a copy
29
of this software and associated documentation files (the "Software"), to deal
30
in the Software without restriction, including without limitation the rights
31
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
32
copies of the Software, and to permit persons to whom the Software is
33
furnished to do so, subject to the following conditions:
35
The above copyright notice and this permission notice shall be included in
36
all copies or substantial portions of the Software.
38
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
39
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
40
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
41
X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
42
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
43
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
45
Except as contained in this notice, the name of the X Consortium shall not be
46
used in advertising or otherwise to promote the sale, use or other dealings
47
in this Software without prior written authorization from the X Consortium.
50
Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
54
Permission to use, copy, modify, and distribute this software and its
55
documentation for any purpose and without fee is hereby granted,
56
provided that the above copyright notice appear in all copies and that
57
both that copyright notice and this permission notice appear in
58
supporting documentation, and that the name of Digital not be
59
used in advertising or publicity pertaining to distribution of the
60
software without specific, written prior permission.
62
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
63
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
64
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
65
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
66
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
67
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
70
******************************************************************/
73
* This is a copy of Xt/Vendor.c with an additional ClassInitialize
74
* procedure to register Xmu resource type converters, and all the
75
* monkey business associated with input methods...
79
/* Make sure all wm properties can make it out of the resource manager */
82
#include <X11/IntrinsicP.h>
83
#include <X11/StringDefs.h>
84
#include <X11/ShellP.h>
85
#include <X11/VendorP.h>
86
#include <X11/Xmu/Converters.h>
87
#include <X11/Xmu/Atoms.h>
88
#include <X11/Xmu/Editres.h>
91
#ifdef HAVE_XMUREGISTEREXTERNALAGENT
92
#ifdef HAVE_X11_XMU_EXTAGENT_H
93
#include <X11/Xmu/ExtAgent.h>
95
/* There is no ExtAgent.h in openwin package, but XmuRegisterExternalAgent
96
* is surely defined in libXmu on Solaris 7.
98
extern void XmuRegisterExternalAgent(
99
#if NeedFunctionPrototypes
101
XtPointer /* data */,
106
#endif /* HAVE_X11_XMU_EXTAGENT_H */
107
#endif /* HAVE_XMUREGISTEREXTERNALAGENT */
110
/* The following two headers are for the input method. */
112
/* $XConsortium: VendorEP.h,v 1.2 94/04/17 20:13:25 kaleb Exp $ */
115
* Copyright 1991 by OMRON Corporation
117
* Permission to use, copy, modify, distribute, and sell this software and its
118
* documentation for any purpose is hereby granted without fee, provided that
119
* the above copyright notice appear in all copies and that both that
120
* copyright notice and this permission notice appear in supporting
121
* documentation, and that the name of OMRON not be used in advertising or
122
* publicity pertaining to distribution of the software without specific,
123
* written prior permission. OMRON makes no representations about the
124
* suitability of this software for any purpose. It is provided "as is"
125
* without express or implied warranty.
127
* OMRON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
128
* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
129
* OMRON BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
130
* ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
131
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTUOUS ACTION,
132
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
135
* Author: Seiji Kuwari OMRON Corporation
137
* kuwa%omron.co.jp@uunet.uu.net
142
Copyright (c) 1994 X Consortium
144
Permission is hereby granted, free of charge, to any person obtaining a copy
145
of this software and associated documentation files (the "Software"), to deal
146
in the Software without restriction, including without limitation the rights
147
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
148
copies of the Software, and to permit persons to whom the Software is
149
furnished to do so, subject to the following conditions:
151
The above copyright notice and this permission notice shall be included in
152
all copies or substantial portions of the Software.
154
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
155
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
156
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
157
X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
158
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
159
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
161
Except as contained in this notice, the name of the X Consortium shall not be
162
used in advertising or otherwise to promote the sale, use or other dealings
163
in this Software without prior written authorization from the X Consortium.
170
/* $XConsortium: XawImP.h,v 1.4 95/06/06 20:50:30 kaleb Exp $ */
173
* Copyright 1991 by OMRON Corporation
175
* Permission to use, copy, modify, distribute, and sell this software and its
176
* documentation for any purpose is hereby granted without fee, provided that
177
* the above copyright notice appear in all copies and that both that
178
* copyright notice and this permission notice appear in supporting
179
* documentation, and that the name of OMRON not be used in advertising or
180
* publicity pertaining to distribution of the software without specific,
181
* written prior permission. OMRON makes no representations about the
182
* suitability of this software for any purpose. It is provided "as is"
183
* without express or implied warranty.
185
* OMRON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
186
* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
187
* OMRON BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
188
* ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
189
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTUOUS ACTION,
190
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
193
* Author: Seiji Kuwari OMRON Corporation
195
* kuwa%omron.co.jp@uunet.uu.net
200
Copyright (c) 1994 X Consortium
202
Permission is hereby granted, free of charge, to any person obtaining a copy
203
of this software and associated documentation files (the "Software"), to deal
204
in the Software without restriction, including without limitation the rights
205
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
206
copies of the Software, and to permit persons to whom the Software is
207
furnished to do so, subject to the following conditions:
209
The above copyright notice and this permission notice shall be included in
210
all copies or substantial portions of the Software.
212
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
213
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
214
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
215
X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
216
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
217
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
219
Except as contained in this notice, the name of the X Consortium shall not be
220
used in advertising or otherwise to promote the sale, use or other dealings
221
in this Software without prior written authorization from the X Consortium.
228
#define XtNinputMethod "inputMethod"
229
#define XtCInputMethod "InputMethod"
230
#define XtNpreeditType "preeditType"
231
#define XtCPreeditType "PreeditType"
232
#define XtNopenIm "openIm"
233
#define XtCOpenIm "OpenIm"
234
#define XtNsharedIc "sharedIc"
235
#define XtCSharedIc "SharedIc"
237
#include <X11/Xaw/Text.h>
239
#define CIICFocus (1 << 0)
240
#define CIFontSet (1 << 1)
241
#define CIFg (1 << 2)
242
#define CIBg (1 << 3)
243
#define CIBgPixmap (1 << 4)
244
#define CICursorP (1 << 5)
245
#define CILineS (1 << 6)
247
typedef struct _XawImPart
250
XrmResourceList resources;
251
Cardinal num_resources;
254
Dimension area_height;
259
typedef struct _XawIcTablePart
263
XIMStyle input_style;
265
unsigned long prev_flg;
271
XawTextPosition cursor_position;
272
unsigned long line_spacing;
273
Boolean openic_error;
274
struct _XawIcTablePart *next;
275
} XawIcTablePart, *XawIcTableList;
277
typedef struct _XawIcPart
279
XIMStyle input_style;
281
XawIcTableList shared_ic_table;
282
XawIcTableList current_ic_table;
283
XawIcTableList ic_table;
286
typedef struct _contextDataRec
292
typedef struct _contextErrDataRec
298
void _XawImResizeVendorShell(
299
#if NeedFunctionPrototypes
304
Dimension _XawImGetShellHeight(
305
#if NeedFunctionPrototypes
311
#if NeedFunctionPrototypes
316
void _XawImInitialize(
317
#if NeedFunctionPrototypes
323
void _XawImReconnect(
324
#if NeedFunctionPrototypes
330
#if NeedFunctionPrototypes
335
void _XawImUnregister(
336
#if NeedFunctionPrototypes
341
void _XawImSetValues(
342
#if NeedFunctionPrototypes
345
Cardinal /* num_args */
349
/* DON'T USE THIS FUNCTION -- it's going away in the next release */
350
void _XawImVASetValues(
351
#if NeedVarargsPrototypes
357
void _XawImSetFocusValues(
358
#if NeedFunctionPrototypes
361
Cardinal /* num_args */
365
/* DON'T USE THIS FUNCTION -- it's going away in the next release */
366
void _XawImVASetFocusValues(
367
#if NeedVarargsPrototypes
373
void _XawImUnsetFocus(
374
#if NeedFunctionPrototypes
379
int _XawImWcLookupString(
380
#if NeedFunctionPrototypes
382
XKeyPressedEvent*, /* event */
383
wchar_t*, /* buffer_return */
384
int, /* bytes_buffer */
385
KeySym*, /* keysym_return */
386
Status* /* status return */
390
int _XawImGetImAreaHeight(
391
#if NeedFunctionPrototypes
396
void _XawImCallVendorShellExtResize(
397
#if NeedFunctionPrototypes
403
#if NeedFunctionPrototypes
409
#endif /* _XawImP_h */
414
} XawVendorShellExtClassPart;
416
typedef struct _VendorShellExtClassRec {
417
ObjectClassPart object_class;
418
XawVendorShellExtClassPart vendor_shell_ext_class;
419
} XawVendorShellExtClassRec;
425
} XawVendorShellExtPart;
427
typedef struct XawVendorShellExtRec {
429
XawVendorShellExtPart vendor_ext;
430
} XawVendorShellExtRec, *XawVendorShellExtWidget;
432
#endif /* _VendorEP_h */
436
static XtResource resources[] = {
437
{XtNinput, XtCInput, XtRBool, sizeof(Bool),
438
XtOffsetOf(VendorShellRec, wm.wm_hints.input),
439
XtRImmediate, (XtPointer)True}
442
/***************************************************************************
444
* Vendor shell class record
446
***************************************************************************/
448
static void XawVendorShellClassInitialize();
449
static void XawVendorShellClassPartInit();
450
static void XawVendorShellInitialize();
451
static Boolean XawVendorShellSetValues();
452
static void Realize(), ChangeManaged();
453
static XtGeometryResult GeometryManager();
454
void XawVendorShellExtResize();
456
static CompositeClassExtensionRec vendorCompositeExt = {
457
/* next_extension */ NULL,
458
/* record_type */ NULLQUARK,
459
/* version */ XtCompositeExtensionVersion,
460
/* record_size */ sizeof (CompositeClassExtensionRec),
461
/* accepts_objects */ TRUE,
462
/* allows_change_managed_set */ FALSE
465
#define SuperClass (&wmShellClassRec)
466
externaldef(vendorshellclassrec) VendorShellClassRec vendorShellClassRec = {
468
/* superclass */ (WidgetClass)SuperClass,
469
/* class_name */ "VendorShell",
470
/* size */ sizeof(VendorShellRec),
471
/* class_initialize */ XawVendorShellClassInitialize,
472
/* class_part_init */ XawVendorShellClassPartInit,
473
/* Class init'ed ? */ FALSE,
474
/* initialize */ XawVendorShellInitialize,
475
/* initialize_hook */ NULL,
476
/* realize */ Realize,
479
/* resources */ resources,
480
/* resource_count */ XtNumber(resources),
481
/* xrm_class */ NULLQUARK,
482
/* compress_motion */ FALSE,
483
/* compress_exposure */ TRUE,
484
/* compress_enterleave*/ FALSE,
485
/* visible_interest */ FALSE,
487
/* resize */ XawVendorShellExtResize,
489
/* set_values */ XawVendorShellSetValues,
490
/* set_values_hook */ NULL,
491
/* set_values_almost */ XtInheritSetValuesAlmost,
492
/* get_values_hook */ NULL,
493
/* accept_focus */ NULL,
494
/* intrinsics version */ XtVersion,
495
/* callback offsets */ NULL,
497
/* query_geometry */ NULL,
498
/* display_accelerator*/ NULL,
501
/* geometry_manager */ GeometryManager,
502
/* change_managed */ ChangeManaged,
503
/* insert_child */ XtInheritInsertChild,
504
/* delete_child */ XtInheritDeleteChild,
505
/* extension */ (XtPointer) &vendorCompositeExt
515
externaldef(vendorshellwidgetclass) WidgetClass vendorShellWidgetClass =
516
(WidgetClass) (&vendorShellClassRec);
519
/***************************************************************************
521
* The following section is for the Vendor shell Extension class record
523
***************************************************************************/
525
static XtResource ext_resources[] = {
526
{XtNinputMethod, XtCInputMethod, XtRString, sizeof(String),
527
XtOffsetOf(XawVendorShellExtRec, vendor_ext.im.input_method),
528
XtRString, (XtPointer)NULL},
529
{XtNpreeditType, XtCPreeditType, XtRString, sizeof(String),
530
XtOffsetOf(XawVendorShellExtRec, vendor_ext.im.preedit_type),
531
XtRString, (XtPointer)"OverTheSpot,OffTheSpot,Root"},
532
{XtNopenIm, XtCOpenIm, XtRBoolean, sizeof(Boolean),
533
XtOffsetOf(XawVendorShellExtRec, vendor_ext.im.open_im),
534
XtRImmediate, (XtPointer)TRUE},
535
{XtNsharedIc, XtCSharedIc, XtRBoolean, sizeof(Boolean),
536
XtOffsetOf(XawVendorShellExtRec, vendor_ext.ic.shared_ic),
537
XtRImmediate, (XtPointer)FALSE}
540
static void XawVendorShellExtClassInitialize();
541
static void XawVendorShellExtInitialize();
542
static void XawVendorShellExtDestroy();
543
static Boolean XawVendorShellExtSetValues();
545
externaldef(vendorshellextclassrec) XawVendorShellExtClassRec
546
xawvendorShellExtClassRec = {
548
/* superclass */ (WidgetClass)&objectClassRec,
549
/* class_name */ "VendorShellExt",
550
/* size */ sizeof(XawVendorShellExtRec),
551
/* class_initialize */ XawVendorShellExtClassInitialize,
552
/* class_part_initialize*/ NULL,
553
/* Class init'ed ? */ FALSE,
554
/* initialize */ XawVendorShellExtInitialize,
555
/* initialize_hook */ NULL,
559
/* resources */ ext_resources,
560
/* resource_count */ XtNumber(ext_resources),
561
/* xrm_class */ NULLQUARK,
566
/* destroy */ XawVendorShellExtDestroy,
569
/* set_values */ XawVendorShellExtSetValues,
570
/* set_values_hook */ NULL,
572
/* get_values_hook */ NULL,
574
/* version */ XtVersion,
575
/* callback_offsets */ NULL,
585
externaldef(xawvendorshellwidgetclass) WidgetClass
586
xawvendorShellExtWidgetClass = (WidgetClass) (&xawvendorShellExtClassRec);
591
XawCvtCompoundTextToString(dpy, args, num_args, fromVal, toVal, cvt_data)
602
static char *mbs = NULL;
605
prop.value = (unsigned char *)fromVal->addr;
606
prop.encoding = XA_COMPOUND_TEXT(dpy);
608
prop.nitems = fromVal->size;
610
if(XmbTextPropertyToTextList(dpy, &prop, &list, &count) < Success) {
611
XtAppWarningMsg(XtDisplayToApplicationContext(dpy),
612
"converter", "XmbTextPropertyToTextList", "XawError",
613
"conversion from CT to MB failed.", NULL, 0);
618
mbs = XtRealloc(mbs, len + 1); /* keep buffer because no one call free :( */
620
XFreeStringList(list);
621
toVal->addr = (XtPointer)mbs;
625
static void XawVendorShellClassInitialize()
627
static XtConvertArgRec screenConvertArg[] = {
628
{XtWidgetBaseOffset, (XtPointer) XtOffsetOf(WidgetRec, core.screen),
632
XtAddConverter(XtRString, XtRCursor, XmuCvtStringToCursor,
633
screenConvertArg, XtNumber(screenConvertArg));
635
XtAddConverter(XtRString, XtRBitmap, XmuCvtStringToBitmap,
636
screenConvertArg, XtNumber(screenConvertArg));
638
XtSetTypeConverter("CompoundText", XtRString, XawCvtCompoundTextToString,
639
NULL, 0, XtCacheNone, NULL);
642
static void XawVendorShellClassPartInit(class)
645
CompositeClassExtension ext;
646
VendorShellWidgetClass vsclass = (VendorShellWidgetClass) class;
648
if ((ext = (CompositeClassExtension)
649
XtGetClassExtension (class,
650
XtOffsetOf(CompositeClassRec,
651
composite_class.extension),
652
NULLQUARK, 1L, (Cardinal) 0)) == NULL) {
653
ext = (CompositeClassExtension) XtNew (CompositeClassExtensionRec);
655
ext->next_extension = vsclass->composite_class.extension;
656
ext->record_type = NULLQUARK;
657
ext->version = XtCompositeExtensionVersion;
658
ext->record_size = sizeof (CompositeClassExtensionRec);
659
ext->accepts_objects = TRUE;
660
ext->allows_change_managed_set = FALSE;
661
vsclass->composite_class.extension = (XtPointer) ext;
667
/* stupid OSF/1 shared libraries have the wrong semantics */
668
/* symbols do not get resolved external to the shared library */
669
void _XawFixupVendorShell()
671
transientShellWidgetClass->core_class.superclass =
672
(WidgetClass) &vendorShellClassRec;
673
topLevelShellWidgetClass->core_class.superclass =
674
(WidgetClass) &vendorShellClassRec;
679
static void XawVendorShellInitialize(req, new, args, num_args)
684
XtAddEventHandler(new, (EventMask) 0, TRUE, _XEditResCheckMessages, NULL);
685
#ifdef HAVE_XMUREGISTEREXTERNALAGENT
686
XtAddEventHandler(new, (EventMask) 0, TRUE, XmuRegisterExternalAgent, NULL);
687
#endif /* HAVE_XMUREGISTEREXTERNALAGENT */
689
XtCreateWidget("shellext", xawvendorShellExtWidgetClass,
690
new, args, *num_args);
694
static Boolean XawVendorShellSetValues(old, ref, new)
695
Widget old, ref, new;
700
static void Realize(wid, vmask, attr)
703
XSetWindowAttributes *attr;
705
WidgetClass super = wmShellWidgetClass;
707
/* Make my superclass do all the dirty work */
709
(*super->core_class.realize) (wid, vmask, attr);
714
static void XawVendorShellExtClassInitialize()
719
static void XawVendorShellExtInitialize(req, new)
722
_XawImInitialize(new->core.parent, new);
726
static void XawVendorShellExtDestroy( w )
729
_XawImDestroy( w->core.parent, w );
733
static Boolean XawVendorShellExtSetValues(old, ref, new)
734
Widget old, ref, new;
739
void XawVendorShellExtResize( w )
742
ShellWidget sw = (ShellWidget) w;
747
_XawImResizeVendorShell( w );
748
core_height = _XawImGetShellHeight( w );
749
for( i = 0; i < sw->composite.num_children; i++ ) {
750
if( XtIsManaged( sw->composite.children[ i ] ) ) {
751
childwid = sw->composite.children[ i ];
752
XtResizeWidget( childwid, sw->core.width, core_height,
753
childwid->core.border_width );
759
static XtGeometryResult GeometryManager( wid, request, reply )
761
XtWidgetGeometry *request;
762
XtWidgetGeometry *reply;
764
ShellWidget shell = (ShellWidget)(wid->core.parent);
765
XtWidgetGeometry my_request;
767
if(shell->shell.allow_shell_resize == FALSE && XtIsRealized(wid))
768
return(XtGeometryNo);
770
if (request->request_mode & (CWX | CWY))
771
return(XtGeometryNo);
773
/* %%% worry about XtCWQueryOnly */
774
my_request.request_mode = 0;
775
if (request->request_mode & CWWidth) {
776
my_request.width = request->width;
777
my_request.request_mode |= CWWidth;
779
if (request->request_mode & CWHeight) {
780
my_request.height = request->height
781
+ _XawImGetImAreaHeight( wid );
782
my_request.request_mode |= CWHeight;
784
if (request->request_mode & CWBorderWidth) {
785
my_request.border_width = request->border_width;
786
my_request.request_mode |= CWBorderWidth;
788
if (XtMakeGeometryRequest((Widget)shell, &my_request, NULL)
790
/* assert: if (request->request_mode & CWWidth) then
791
* shell->core.width == request->width
792
* assert: if (request->request_mode & CWHeight) then
793
* shell->core.height == request->height
795
* so, whatever the WM sized us to (if the Shell requested
796
* only one of the two) is now the correct child size
799
wid->core.width = shell->core.width;
800
wid->core.height = shell->core.height;
801
if (request->request_mode & CWBorderWidth) {
802
wid->core.x = wid->core.y = -request->border_width;
804
_XawImCallVendorShellExtResize(wid);
805
return XtGeometryYes;
806
} else return XtGeometryNo;
809
static void ChangeManaged(wid)
812
ShellWidget w = (ShellWidget) wid;
816
(*SuperClass->composite_class.change_managed)(wid);
817
for (i = w->composite.num_children, childP = w->composite.children;
819
if (XtIsManaged(*childP)) {
820
XtSetKeyboardFocus(wid, *childP);