1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-02-03 23:05:46 +01:00

made restore from winspector.c automatically apply

This commit is contained in:
kojima
2000-03-10 00:28:55 +00:00
parent 150432ff95
commit 90ab2c15cb
6 changed files with 27 additions and 14 deletions

View File

@@ -341,7 +341,7 @@ wClientCheckProperty(WWindow *wwin, XPropertyEvent *event)
free(tmp);
}
break;
case XA_WM_ICON_NAME:
#ifdef KWM_HINTS
wKWMSendEventMessage(wwin, WKWMChangedClient);
@@ -679,6 +679,13 @@ wClientGetNormalHints(WWindow *wwin, XWindowAttributes *wattribs, Bool geometry,
}
/* some buggy apps set weird hints.. */
if (wwin->normal_hints->min_width <= 0)
wwin->normal_hints->min_width = MIN_WINDOW_SIZE;
if (wwin->normal_hints->min_height <= 0)
wwin->normal_hints->min_height = MIN_WINDOW_SIZE;
if (wwin->normal_hints->max_width < wwin->normal_hints->min_width)
wwin->normal_hints->max_width = wwin->normal_hints->min_width;
@@ -707,12 +714,6 @@ wClientGetNormalHints(WWindow *wwin, XWindowAttributes *wattribs, Bool geometry,
wwin->normal_hints->max_aspect.y = 1;
}
if (wwin->normal_hints->min_width <= 0)
wwin->normal_hints->min_width = MIN_WINDOW_SIZE;
if (wwin->normal_hints->min_height <= 0)
wwin->normal_hints->min_height = MIN_WINDOW_SIZE;
if (wwin->normal_hints->min_height > wwin->normal_hints->max_height) {
wwin->normal_hints->min_height = wwin->normal_hints->max_height;
}

View File

@@ -1844,8 +1844,11 @@ wWindowConstrainSize(WWindow *wwin, int *nwidth, int *nheight)
height = (((height - minH) / hinc) * hinc) + minH;
}
*nwidth = width;
*nheight = height;
/* broken stupid apps may cause preposterous values for these.. */
if (width > 0)
*nwidth = width;
if (height > 0)
*nheight = height;
}

View File

@@ -1045,6 +1045,11 @@ revertSettings(WMButton *button, InspectorPanel *panel)
} else {
WMSetPopUpButtonSelectedItem(panel->wsP, 0);
}
/* must auto apply, so that there wno't be internal
* inconsistencies between the state in the flags and
* the actual state of the window */
applySettings(panel->applyBtn, panel);
}