You should have received a copy of the GNU General Public License
along with GNU Emacs; see the file COPYING. If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <stdio.h>
life easier?
*/
{
- int x, y, w, h;
+ unsigned int x, y, w, h;
Widget topmost = instance->parent;
Arg args[2];
XtPointer call_data;
{
LWLIB_ID id;
+ Cardinal nkids;
+ int i;
Widget *kids = 0;
Widget widget;
if (! XtIsSubclass (shell, shellWidgetClass))
abort ();
+ XtVaGetValues (shell, XtNnumChildren, &nkids, 0);
XtVaGetValues (shell, XtNchildren, &kids, 0);
if (!kids || !*kids)
abort ();
- widget = kids [0];
- if (! XtIsSubclass (widget, dialogWidgetClass))
- abort ();
+ for (i = 0; i < nkids; i++)
+ {
+ widget = kids[i];
+ if (XtIsSubclass (widget, dialogWidgetClass))
+ break;
+ }
id = lw_get_widget_id (widget);
if (! id) abort ();