1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-20 04:48:06 +01:00

Fixed problem with kcalc not having a miniaturize button

This commit is contained in:
dan
2002-01-04 00:30:11 +00:00
parent 365556b676
commit a8c7375623
6 changed files with 30 additions and 32 deletions

View File

@@ -7,6 +7,7 @@ Changes since version 0.80.0:
WMState.<number> file on multihead system. WMState.<number> file on multihead system.
- Fixed problem with keyboard shortcuts executed an every screen for - Fixed problem with keyboard shortcuts executed an every screen for
multihead systems. multihead systems.
- Fixed problem with kcalc not having a miniaturize button.
Changes since version 0.70.0: Changes since version 0.70.0:

View File

@@ -899,8 +899,8 @@ wIconifyWindow(WWindow *wwin)
return; return;
} }
if (wwin->transient_for!=None &&
if (wwin->transient_for!=None) { wwin->transient_for!=wwin->screen_ptr->root_win) {
WWindow *owner = wWindowFor(wwin->transient_for); WWindow *owner = wWindowFor(wwin->transient_for);
if (owner && owner->flags.miniaturized) if (owner && owner->flags.miniaturized)

View File

@@ -333,8 +333,9 @@ wSessionSaveState(WScreen *scr)
while (wwin) { while (wwin) {
WApplication *wapp=wApplicationOf(wwin->main_window); WApplication *wapp=wApplicationOf(wwin->main_window);
if (wwin->transient_for==None if ((wwin->transient_for==None
&& WMGetFirstInArray(wapp_list, wapp)==WANotFound || wwin->transient_for==wwin->screen_ptr->root_win)
&& WMGetFirstInArray(wapp_list, wapp)==WANotFound
&& !WFLAGP(wwin, dont_save_session)) { && !WFLAGP(wwin, dont_save_session)) {
/* A entry for this application was not yet saved. Save one. */ /* A entry for this application was not yet saved. Save one. */
if ((win_info = makeWindowState(wwin, wapp))!=NULL) { if ((win_info = makeWindowState(wwin, wapp))!=NULL) {

View File

@@ -390,17 +390,17 @@ wWindowSetupInitialAttributes(WWindow *wwin, int *level, int *workspace)
WSETUFLAG(wwin, kill_close, 1); WSETUFLAG(wwin, kill_close, 1);
/* transients can't be iconified or maximized */ /* transients can't be iconified or maximized */
if (wwin->transient_for) { if (wwin->transient_for!=None && wwin->transient_for!=scr->root_win) {
WSETUFLAG(wwin, no_miniaturizable, 1); WSETUFLAG(wwin, no_miniaturizable, 1);
WSETUFLAG(wwin, no_miniaturize_button, 1); WSETUFLAG(wwin, no_miniaturize_button, 1);
} }
/* if the window can't be resized, remove the resizebar */ /* if the window can't be resized, remove the resizebar */
if (wwin->normal_hints->flags & (PMinSize|PMaxSize) if (wwin->normal_hints->flags & (PMinSize|PMaxSize)
&& (wwin->normal_hints->min_width==wwin->normal_hints->max_width) && (wwin->normal_hints->min_width==wwin->normal_hints->max_width)
&& (wwin->normal_hints->min_height==wwin->normal_hints->max_height)) { && (wwin->normal_hints->min_height==wwin->normal_hints->max_height)) {
WSETUFLAG(wwin, no_resizable, 1); WSETUFLAG(wwin, no_resizable, 1);
WSETUFLAG(wwin, no_resizebar, 1); WSETUFLAG(wwin, no_resizebar, 1);
} }
/* set GNUstep window attributes */ /* set GNUstep window attributes */
@@ -474,20 +474,24 @@ wWindowSetupInitialAttributes(WWindow *wwin, int *level, int *workspace)
*/ */
if (wwin->user_flags.no_appicon && wwin->defined_user_flags.no_appicon) if (wwin->user_flags.no_appicon && wwin->defined_user_flags.no_appicon)
wwin->user_flags.emulate_appicon = 0; wwin->user_flags.emulate_appicon = 0;
//WSETUFLAG(wwin, emulate_appicon, 0);
if (wwin->main_window!=None) { if (wwin->main_window!=None) {
WApplication *wapp = wApplicationOf(wwin->main_window); WApplication *wapp = wApplicationOf(wwin->main_window);
if (wapp && !wapp->flags.emulated) if (wapp && !wapp->flags.emulated)
wwin->user_flags.emulate_appicon = 0; wwin->user_flags.emulate_appicon = 0;
//WSETUFLAG(wwin, emulate_appicon, 0);
} }
if (wwin->transient_for!=None if (wwin->transient_for!=None
&& wwin->transient_for!=wwin->screen_ptr->root_win) && wwin->transient_for!=wwin->screen_ptr->root_win)
wwin->user_flags.emulate_appicon = 0; wwin->user_flags.emulate_appicon = 0;
//WSETUFLAG(wwin, emulate_appicon, 0);
if (wwin->user_flags.sunken && wwin->defined_user_flags.sunken if (wwin->user_flags.sunken && wwin->defined_user_flags.sunken
&& wwin->user_flags.floating && wwin->defined_user_flags.floating) && wwin->user_flags.floating && wwin->defined_user_flags.floating)
wwin->user_flags.sunken = 0; wwin->user_flags.sunken = 0;
//WSETUFLAG(wwin, sunken, 0);
WSETUFLAG(wwin, no_shadeable, WFLAGP(wwin, no_titlebar)); WSETUFLAG(wwin, no_shadeable, WFLAGP(wwin, no_titlebar));
} }
@@ -1162,7 +1166,7 @@ wManageWindow(WScreen *scr, Window window)
foo |= WFF_LEFT_BUTTON; foo |= WFF_LEFT_BUTTON;
#ifdef XKB_BUTTON_HINT #ifdef XKB_BUTTON_HINT
if (WFLAGP(wwin, no_language_button) || WFLAGP(wwin, no_focusable)) if (WFLAGP(wwin, no_language_button) || WFLAGP(wwin, no_focusable))
foo |= WFF_LANGUAGE_BUTTON; foo |= WFF_LANGUAGE_BUTTON;
#endif #endif
if (foo!=0) if (foo!=0)
wFrameWindowHideButton(wwin->frame, foo); wFrameWindowHideButton(wwin->frame, foo);
@@ -1317,7 +1321,8 @@ wManageWindow(WScreen *scr, Window window)
#endif #endif
if (wPreferences.superfluous && !wPreferences.no_animations if (wPreferences.superfluous && !wPreferences.no_animations
&& !scr->flags.startup && wwin->transient_for==None && !scr->flags.startup &&
(wwin->transient_for==None || wwin->transient_for==scr->root_win)
/* /*
* The brain damaged idiotic non-click to focus modes will * The brain damaged idiotic non-click to focus modes will
* have trouble with this because: * have trouble with this because:
@@ -1344,11 +1349,7 @@ wManageWindow(WScreen *scr, Window window)
/* setup stacking descriptor */ /* setup stacking descriptor */
if (transientOwner) { if (transientOwner) {
/* && wPreferences.on_top_transients */ wwin->frame->core->stacking->child_of = transientOwner->frame->core;
if (transientOwner) {
wwin->frame->core->stacking->child_of =
transientOwner->frame->core;
}
} else { } else {
wwin->frame->core->stacking->child_of = NULL; wwin->frame->core->stacking->child_of = NULL;
} }
@@ -1557,12 +1558,7 @@ wManageInternalWindow(WScreen *scr, Window window, Window owner,
XMapSubwindows(dpy, wwin->frame->core->window); XMapSubwindows(dpy, wwin->frame->core->window);
/* setup stacking descriptor */ /* setup stacking descriptor */
if ( if (wwin->transient_for!=None && wwin->transient_for!=scr->root_win) {
#ifdef removed
wPreferences.on_top_transients &&
#endif
wwin->transient_for!=None
&& wwin->transient_for!=scr->root_win) {
WWindow *tmp; WWindow *tmp;
tmp = wWindowFor(wwin->transient_for); tmp = wWindowFor(wwin->transient_for);
if (tmp) if (tmp)

View File

@@ -810,8 +810,8 @@ applySettings(WMButton *button, InspectorPanel *panel)
WSETUFLAG(wwin, no_close_button, WMGetButtonSelected(panel->attrChk[2])); WSETUFLAG(wwin, no_close_button, WMGetButtonSelected(panel->attrChk[2]));
WSETUFLAG(wwin, no_miniaturize_button, WMGetButtonSelected(panel->attrChk[3])); WSETUFLAG(wwin, no_miniaturize_button, WMGetButtonSelected(panel->attrChk[3]));
WSETUFLAG(wwin, no_border, WMGetButtonSelected(panel->attrChk[4])); WSETUFLAG(wwin, no_border, WMGetButtonSelected(panel->attrChk[4]));
floating = WMGetButtonSelected(panel->attrChk[5]); floating = WMGetButtonSelected(panel->attrChk[5]);
sunken = WMGetButtonSelected(panel->attrChk[6]); sunken = WMGetButtonSelected(panel->attrChk[6]);
WSETUFLAG(wwin, omnipresent, WMGetButtonSelected(panel->attrChk[7])); WSETUFLAG(wwin, omnipresent, WMGetButtonSelected(panel->attrChk[7]));
WSETUFLAG(wwin, start_miniaturized, WMGetButtonSelected(panel->attrChk[8])); WSETUFLAG(wwin, start_miniaturized, WMGetButtonSelected(panel->attrChk[8]));
WSETUFLAG(wwin, start_maximized, WMGetButtonSelected(panel->attrChk[9])); WSETUFLAG(wwin, start_maximized, WMGetButtonSelected(panel->attrChk[9]));
@@ -819,7 +819,7 @@ applySettings(WMButton *button, InspectorPanel *panel)
WSETUFLAG(wwin, no_bind_keys, WMGetButtonSelected(panel->moreChk[0])); WSETUFLAG(wwin, no_bind_keys, WMGetButtonSelected(panel->moreChk[0]));
WSETUFLAG(wwin, no_bind_mouse, WMGetButtonSelected(panel->moreChk[1])); WSETUFLAG(wwin, no_bind_mouse, WMGetButtonSelected(panel->moreChk[1]));
skip_window_list = WMGetButtonSelected(panel->moreChk[2]); skip_window_list = WMGetButtonSelected(panel->moreChk[2]);
WSETUFLAG(wwin, no_focusable, WMGetButtonSelected(panel->moreChk[3])); WSETUFLAG(wwin, no_focusable, WMGetButtonSelected(panel->moreChk[3]));
WSETUFLAG(wwin, dont_move_off, WMGetButtonSelected(panel->moreChk[4])); WSETUFLAG(wwin, dont_move_off, WMGetButtonSelected(panel->moreChk[4]));
WSETUFLAG(wwin, no_hide_others, WMGetButtonSelected(panel->moreChk[5])); WSETUFLAG(wwin, no_hide_others, WMGetButtonSelected(panel->moreChk[5]));
@@ -1633,7 +1633,7 @@ createInspectorForWindow(WWindow *wwin, int xpos, int ypos,
/* if the window is a transient, don't let it have a miniaturize /* if the window is a transient, don't let it have a miniaturize
* button */ * button */
if (wWindowFor(wwin->transient_for)!=NULL) if (wwin->transient_for!=None && wwin->transient_for!=scr->root_win)
WMSetButtonEnabled(panel->attrChk[3], False); WMSetButtonEnabled(panel->attrChk[3], False);
else else
WMSetButtonEnabled(panel->attrChk[3], True); WMSetButtonEnabled(panel->attrChk[3], True);