1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-20 12:58:08 +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

@@ -48,6 +48,10 @@ Changes since version 0.61.1:
- added Jim Knoble <jmknoble@pobox.com>'s cursor thing patch - added Jim Knoble <jmknoble@pobox.com>'s cursor thing patch
- fixed lock of wmaker when clicking on menu multiple times - fixed lock of wmaker when clicking on menu multiple times
- made transients appear near their owner - made transients appear near their owner
- fixed crash bug with broken java implementations (Miguel Covarrubias
<mcovarr@tigr.org>)
- made Revert on attributes panel apply the reverted changes immediately
to avoid inconsistent internal state
Changes since version 0.61.0: Changes since version 0.61.0:
............................. .............................

View File

@@ -204,7 +204,7 @@ createPanel(Panel *p)
panel->wrapB = WMCreateSwitchButton(panel->optF); panel->wrapB = WMCreateSwitchButton(panel->optF);
WMResizeWidget(panel->wrapB, 440, 32); WMResizeWidget(panel->wrapB, 440, 32);
WMMoveWidget(panel->wrapB, 25, 8); WMMoveWidget(panel->wrapB, 25, 8);
WMSetButtonText(panel->wrapB, _("Always open submenus inside the screen, instead of scrolling.\nNote: this can be an annoyance at some circumstances.")); WMSetButtonText(panel->wrapB, _("Always open submenus inside the screen, instead of scrolling.\nNote: this is annoying."));
panel->autoB = WMCreateSwitchButton(panel->optF); panel->autoB = WMCreateSwitchButton(panel->optF);
WMResizeWidget(panel->autoB, 440, 20); WMResizeWidget(panel->autoB, 440, 20);

View File

@@ -163,8 +163,8 @@ createPanel(Panel *p)
WMWidgetView(panel->sizeF)); WMWidgetView(panel->sizeF));
panel->sizeP = WMCreatePopUpButton(panel->sizeF); panel->sizeP = WMCreatePopUpButton(panel->sizeF);
WMResizeWidget(panel->sizeP, 180, 20); WMResizeWidget(panel->sizeP, 200, 20);
WMMoveWidget(panel->sizeP, 32, 24); WMMoveWidget(panel->sizeP, 22, 24);
WMAddPopUpButtonItem(panel->sizeP, _("Corner of screen")); WMAddPopUpButtonItem(panel->sizeP, _("Corner of screen"));
WMAddPopUpButtonItem(panel->sizeP, _("Center of screen")); WMAddPopUpButtonItem(panel->sizeP, _("Center of screen"));
WMAddPopUpButtonItem(panel->sizeP, _("Center of resized window")); WMAddPopUpButtonItem(panel->sizeP, _("Center of resized window"));
@@ -183,8 +183,8 @@ createPanel(Panel *p)
WMWidgetView(panel->posiF)); WMWidgetView(panel->posiF));
panel->posiP = WMCreatePopUpButton(panel->posiF); panel->posiP = WMCreatePopUpButton(panel->posiF);
WMResizeWidget(panel->posiP, 180, 20); WMResizeWidget(panel->posiP, 200, 20);
WMMoveWidget(panel->posiP, 32, 24); WMMoveWidget(panel->posiP, 22, 24);
WMAddPopUpButtonItem(panel->posiP, _("Corner of screen")); WMAddPopUpButtonItem(panel->posiP, _("Corner of screen"));
WMAddPopUpButtonItem(panel->posiP, _("Center of screen")); WMAddPopUpButtonItem(panel->posiP, _("Center of screen"));
WMAddPopUpButtonItem(panel->posiP, _("Center of resized window")); WMAddPopUpButtonItem(panel->posiP, _("Center of resized window"));

View File

@@ -679,6 +679,13 @@ wClientGetNormalHints(WWindow *wwin, XWindowAttributes *wattribs, Bool geometry,
} }
/* some buggy apps set weird hints.. */ /* 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) if (wwin->normal_hints->max_width < wwin->normal_hints->min_width)
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; 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) { if (wwin->normal_hints->min_height > wwin->normal_hints->max_height) {
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; height = (((height - minH) / hinc) * hinc) + minH;
} }
*nwidth = width; /* broken stupid apps may cause preposterous values for these.. */
*nheight = height; if (width > 0)
*nwidth = width;
if (height > 0)
*nheight = height;
} }

View File

@@ -1045,6 +1045,11 @@ revertSettings(WMButton *button, InspectorPanel *panel)
} else { } else {
WMSetPopUpButtonSelectedItem(panel->wsP, 0); 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);
} }