diff --git a/ChangeLog b/ChangeLog index 180d131c..03718180 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,7 @@ Changes since version 0.80.0: WMState. file on multihead system. - Fixed problem with keyboard shortcuts executed an every screen for multihead systems. +- Fixed problem with kcalc not having a miniaturize button. Changes since version 0.70.0: diff --git a/src/actions.c b/src/actions.c index b091ab29..e9d1a133 100644 --- a/src/actions.c +++ b/src/actions.c @@ -899,8 +899,8 @@ wIconifyWindow(WWindow *wwin) 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); if (owner && owner->flags.miniaturized) diff --git a/src/session.c b/src/session.c index 766b468d..be81265d 100644 --- a/src/session.c +++ b/src/session.c @@ -333,8 +333,9 @@ wSessionSaveState(WScreen *scr) while (wwin) { WApplication *wapp=wApplicationOf(wwin->main_window); - if (wwin->transient_for==None - && WMGetFirstInArray(wapp_list, wapp)==WANotFound + if ((wwin->transient_for==None + || wwin->transient_for==wwin->screen_ptr->root_win) + && WMGetFirstInArray(wapp_list, wapp)==WANotFound && !WFLAGP(wwin, dont_save_session)) { /* A entry for this application was not yet saved. Save one. */ if ((win_info = makeWindowState(wwin, wapp))!=NULL) { diff --git a/src/wdefaults.c b/src/wdefaults.c index f74a1f97..17f2fcee 100644 --- a/src/wdefaults.c +++ b/src/wdefaults.c @@ -148,7 +148,7 @@ get_value(WMPropList *dict_win, WMPropList *dict_class, WMPropList *dict_name, Bool useGlobalDefault) { WMPropList *value; - + if (dict_win) { value = WMGetFromPLDictionary(dict_win, option); @@ -167,16 +167,16 @@ get_value(WMPropList *dict_win, WMPropList *dict_class, WMPropList *dict_name, if (value) return value; } - + if (!useGlobalDefault) return NULL; - + if (dict_any) { value = WMGetFromPLDictionary(dict_any, option); if (value) return value; } - + return default_value; } @@ -253,7 +253,7 @@ wDefaultFillAttributes(WScreen *scr, char *instance, char *class, if (value) {attr->flag = getBool(attrib, value); \ if (mask) mask->flag = 1;} - /* get the data */ + /* get the data */ value = get_value(dw, dc, dn, da, ANoTitlebar, No, useGlobalDefault); APPLY_VAL(value, no_titlebar, ANoTitlebar); diff --git a/src/window.c b/src/window.c index c321e306..6ee54890 100644 --- a/src/window.c +++ b/src/window.c @@ -390,17 +390,17 @@ wWindowSetupInitialAttributes(WWindow *wwin, int *level, int *workspace) WSETUFLAG(wwin, kill_close, 1); /* transients can't be iconified or maximized */ - if (wwin->transient_for) { - WSETUFLAG(wwin, no_miniaturizable, 1); + if (wwin->transient_for!=None && wwin->transient_for!=scr->root_win) { + WSETUFLAG(wwin, no_miniaturizable, 1); WSETUFLAG(wwin, no_miniaturize_button, 1); } /* if the window can't be resized, remove the resizebar */ if (wwin->normal_hints->flags & (PMinSize|PMaxSize) - && (wwin->normal_hints->min_width==wwin->normal_hints->max_width) - && (wwin->normal_hints->min_height==wwin->normal_hints->max_height)) { - WSETUFLAG(wwin, no_resizable, 1); - WSETUFLAG(wwin, no_resizebar, 1); + && (wwin->normal_hints->min_width==wwin->normal_hints->max_width) + && (wwin->normal_hints->min_height==wwin->normal_hints->max_height)) { + WSETUFLAG(wwin, no_resizable, 1); + WSETUFLAG(wwin, no_resizebar, 1); } /* 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) wwin->user_flags.emulate_appicon = 0; + //WSETUFLAG(wwin, emulate_appicon, 0); if (wwin->main_window!=None) { WApplication *wapp = wApplicationOf(wwin->main_window); if (wapp && !wapp->flags.emulated) wwin->user_flags.emulate_appicon = 0; + //WSETUFLAG(wwin, emulate_appicon, 0); } if (wwin->transient_for!=None && wwin->transient_for!=wwin->screen_ptr->root_win) wwin->user_flags.emulate_appicon = 0; + //WSETUFLAG(wwin, emulate_appicon, 0); if (wwin->user_flags.sunken && wwin->defined_user_flags.sunken && wwin->user_flags.floating && wwin->defined_user_flags.floating) wwin->user_flags.sunken = 0; + //WSETUFLAG(wwin, sunken, 0); WSETUFLAG(wwin, no_shadeable, WFLAGP(wwin, no_titlebar)); } @@ -1162,7 +1166,7 @@ wManageWindow(WScreen *scr, Window window) foo |= WFF_LEFT_BUTTON; #ifdef XKB_BUTTON_HINT if (WFLAGP(wwin, no_language_button) || WFLAGP(wwin, no_focusable)) - foo |= WFF_LANGUAGE_BUTTON; + foo |= WFF_LANGUAGE_BUTTON; #endif if (foo!=0) wFrameWindowHideButton(wwin->frame, foo); @@ -1317,7 +1321,8 @@ wManageWindow(WScreen *scr, Window window) #endif 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 * have trouble with this because: @@ -1344,11 +1349,7 @@ wManageWindow(WScreen *scr, Window window) /* setup stacking descriptor */ if (transientOwner) { - /* && wPreferences.on_top_transients */ - if (transientOwner) { - wwin->frame->core->stacking->child_of = - transientOwner->frame->core; - } + wwin->frame->core->stacking->child_of = transientOwner->frame->core; } else { wwin->frame->core->stacking->child_of = NULL; } @@ -1557,12 +1558,7 @@ wManageInternalWindow(WScreen *scr, Window window, Window owner, XMapSubwindows(dpy, wwin->frame->core->window); /* setup stacking descriptor */ - if ( -#ifdef removed - wPreferences.on_top_transients && -#endif - wwin->transient_for!=None - && wwin->transient_for!=scr->root_win) { + if (wwin->transient_for!=None && wwin->transient_for!=scr->root_win) { WWindow *tmp; tmp = wWindowFor(wwin->transient_for); if (tmp) diff --git a/src/winspector.c b/src/winspector.c index a36acc03..fe3598ef 100644 --- a/src/winspector.c +++ b/src/winspector.c @@ -810,8 +810,8 @@ applySettings(WMButton *button, InspectorPanel *panel) WSETUFLAG(wwin, no_close_button, WMGetButtonSelected(panel->attrChk[2])); WSETUFLAG(wwin, no_miniaturize_button, WMGetButtonSelected(panel->attrChk[3])); WSETUFLAG(wwin, no_border, WMGetButtonSelected(panel->attrChk[4])); - floating = WMGetButtonSelected(panel->attrChk[5]); - sunken = WMGetButtonSelected(panel->attrChk[6]); + floating = WMGetButtonSelected(panel->attrChk[5]); + sunken = WMGetButtonSelected(panel->attrChk[6]); WSETUFLAG(wwin, omnipresent, WMGetButtonSelected(panel->attrChk[7])); WSETUFLAG(wwin, start_miniaturized, WMGetButtonSelected(panel->attrChk[8])); 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_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, dont_move_off, WMGetButtonSelected(panel->moreChk[4])); 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 * button */ - if (wWindowFor(wwin->transient_for)!=NULL) + if (wwin->transient_for!=None && wwin->transient_for!=scr->root_win) WMSetButtonEnabled(panel->attrChk[3], False); else WMSetButtonEnabled(panel->attrChk[3], True);