#if XBOARD
{ "slaveX", ArgX, (void *) &wpDualBoard.x, TRUE, (ArgIniType) CW_USEDEFAULT },
{ "slaveY", ArgY, (void *) &wpDualBoard.y, TRUE, (ArgIniType) CW_USEDEFAULT },
- { "slaveW", ArgInt, (void *) &wpDualBoard.width, TRUE, (ArgIniType) CW_USEDEFAULT },
- { "slaveH", ArgInt, (void *) &wpDualBoard.height, TRUE, (ArgIniType) CW_USEDEFAULT },
+ { "slaveW", ArgInt, (void *) &wpDualBoard.width, FALSE, (ArgIniType) CW_USEDEFAULT },
+ { "slaveH", ArgInt, (void *) &wpDualBoard.height, FALSE, (ArgIniType) CW_USEDEFAULT },
#endif
/* [AS] Layout stuff */
{ "moveHistoryUp", ArgBoolean, (void *) &wpMoveHistory.visible, TRUE, (ArgIniType) TRUE },
(gpointer)(intptr_t) dlgNr);
shellUp[dlgNr]++;
- if(dlgNr && wp[dlgNr] && wp[dlgNr]->width > 0) { // if persistent window-info available, reposition
+ if(dlgNr && wp[dlgNr]) { // if persistent window-info available, reposition
+ if(wp[dlgNr]->x > 0 && wp[dlgNr]->y > 0)
gtk_window_move(GTK_WINDOW(dialog), wp[dlgNr]->x, wp[dlgNr]->y);
-//printf("moved %d to (%d,%d)\n", dlgNr, wp[dlgNr]->x, wp[dlgNr]->y);
+ if(wp[dlgNr]->width > 0 && wp[dlgNr]->height > 0)
gtk_window_resize(GTK_WINDOW(dialog), wp[dlgNr]->width, wp[dlgNr]->height);
-//printf("resized %d to %dx%d\n", dlgNr, wp[dlgNr]->width, wp[dlgNr]->height);
}
return 1; // tells caller he must do initialization (e.g. add specific event handlers)
shellUp[dlgNr]++; // count rather than flag
previous = NULL;
if(textField) SetFocus(textField, popup, (XEvent*) NULL, False);
- if(dlgNr && wp[dlgNr] && wp[dlgNr]->width > 0) { // if persistent window-info available, reposition
+ if(dlgNr && wp[dlgNr]) { // if persistent window-info available, reposition
j = 0;
- XtSetArg(args[j], XtNheight, (Dimension) (wp[dlgNr]->height)); j++;
- XtSetArg(args[j], XtNwidth, (Dimension) (wp[dlgNr]->width)); j++;
- XtSetArg(args[j], XtNx, (Position) (wp[dlgNr]->x)); j++;
- XtSetArg(args[j], XtNy, (Position) (wp[dlgNr]->y)); j++;
- XtSetValues(popup, args, j);
+ if(wp[dlgNr]->width > 0 && wp[dlgNr]->height > 0) {
+ XtSetArg(args[j], XtNheight, (Dimension) (wp[dlgNr]->height)); j++;
+ XtSetArg(args[j], XtNwidth, (Dimension) (wp[dlgNr]->width)); j++;
+ }
+ if(wp[dlgNr]->width > 0 && wp[dlgNr]->y > 0) {
+ XtSetArg(args[j], XtNx, (Position) (wp[dlgNr]->x)); j++;
+ XtSetArg(args[j], XtNy, (Position) (wp[dlgNr]->y)); j++;
+ }
+ if(j) XtSetValues(popup, args, j);
}
RaiseWindow(dlgNr);
return 1; // tells caller he must do initialization (e.g. add specific event handlers)