base_height = (wmshell->core.height - ew->core.height
+ (rounded_height - (char_height * ch)));
- /* This is kind of sleazy, but I can't see how else to tell it to
- make it mark the WM_SIZE_HINTS size as user specified.
- */
-/* ((WMShellWidget) wmshell)->wm.size_hints.flags |= USSize;*/
+ /* Ensure that Xt actually sets window manager hint flags specified
+ by the caller by making sure XtNminWidth (a relatively harmless
+ resource) always changes each time this function is invoked. */
+ ew->emacs_frame.size_switch = !ew->emacs_frame.size_switch;
XtVaSetValues (wmshell,
XtNbaseWidth, (XtArgVal) base_width,
XtNbaseHeight, (XtArgVal) base_height,
XtNwidthInc, (XtArgVal) (frame_resize_pixelwise ? 1 : cw),
XtNheightInc, (XtArgVal) (frame_resize_pixelwise ? 1 : ch),
- XtNminWidth, (XtArgVal) base_width,
- XtNminHeight, (XtArgVal) base_height,
+ XtNminWidth, (XtArgVal) (base_width
+ + ew->emacs_frame.size_switch),
+ XtNminHeight, (XtArgVal) (base_height
+ + ew->emacs_frame.size_switch),
NULL);
}
exit (1);
}
+ ew->emacs_frame.size_switch = 1;
+
update_from_various_frame_slots (ew);
set_frame_size (ew);
}
eassert (XtIsWMShell (f->output_data.x->widget));
shell = (WMShellWidget) f->output_data.x->widget;
- shell->wm.size_hints.flags &= ~(PPosition | USPosition);
- shell->wm.size_hints.flags |= flags & (PPosition | USPosition);
+ if (flags)
+ {
+ shell->wm.size_hints.flags &= ~(PPosition | USPosition);
+ shell->wm.size_hints.flags |= flags & (PPosition | USPosition);
+ }
if (user_position)
{