X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=mod_sp%2Fmain.c;h=ae5d7f9877cd9147216a86fa59986f21ccf239dc;hb=d851e7d55f99040bdfb6b5e1b799b7d6adad22b2;hp=e30d8c89dc53b0cccbd1198617206c3dcdf955fd;hpb=d2a43a53786878c1273313249d3b49f6cd559b00;p=ion3.git diff --git a/mod_sp/main.c b/mod_sp/main.c index e30d8c8..ae5d7f9 100644 --- a/mod_sp/main.c +++ b/mod_sp/main.c @@ -1,7 +1,7 @@ /* * ion/mod_sp/main.c * - * Copyright (c) Tuomo Valkonen 2004-2007. + * Copyright (c) Tuomo Valkonen 2004-2008. * * See the included file LICENSE for details. */ @@ -64,7 +64,7 @@ static WRegion *create_scratchws(WWindow *parent, const WFitParams *fp, { WRegion *reg; WRegionAttachData data; - WGroupAttachParams par; + WGroupAttachParams par=GROUPATTACHPARAMS_INIT; WGroupWS *ws; ws=create_groupws(parent, fp); @@ -108,8 +108,8 @@ static WRegion *create_scratchws(WWindow *parent, const WFitParams *fp, static WRegion *create(WMPlex *mplex, int flags) { WRegion *sp; - WMPlexAttachParams par; - + WMPlexAttachParams par=MPLEXATTACHPARAMS_INIT; + par.flags=(flags |MPLEX_ATTACH_UNNUMBERED |MPLEX_ATTACH_SIZEPOLICY @@ -155,11 +155,11 @@ bool mod_sp_set_shown_on(WMPlex *mplex, const char *how) int setpar=libtu_setparam_invert(libtu_string_to_setparam(how)); WMPlexIterTmp tmp; WRegion *reg; - bool found=FALSE; + bool found=FALSE, res=FALSE; FOR_ALL_MANAGED_BY_MPLEX(mplex, reg, tmp){ if(is_scratchpad(reg)){ - mplex_set_hidden(mplex, reg, setpar); + res=!mplex_set_hidden(mplex, reg, setpar); found=TRUE; } } @@ -168,9 +168,10 @@ bool mod_sp_set_shown_on(WMPlex *mplex, const char *how) int sp=libtu_string_to_setparam(how); if(sp==SETPARAM_SET || sp==SETPARAM_TOGGLE) found=(create(mplex, 0)!=NULL); + res=found; } - return found; + return res; }