The following example program sets the window size after the window is
realized. The window changes to the new size and then back to the old one
once the main loop starts. Only if I re-realize the widget, the new size
stays.
Markus
#include <Pt.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
main(int argc, char *argv[])
{
PtWidget_t *window;
window = PtAppInit(0, 0, 0, 0, 0);
PhDim_t size;
size.w = 50;
size.h = 100;
PtSetResource(window, Pt_ARG_DIM, &size, 0);
PtRealizeWidget(window);
size.w = 100;
size.h = 50;
PtSetResource(window, Pt_ARG_DIM, &size, 0);
// Uncomment the following to make it work:
// PtReRealizeWidget(window);
sleep(1);
PtMainLoop();
}