~ctwm/ctwm/trunk

« back to all changes in this revision

Viewing changes to otp.c

  • Committer: Matthew Fuller
  • Date: 2017-03-27 01:18:44 UTC
  • mto: This revision was merged to the branch mainline in revision 579.
  • Revision ID: fullermd@over-yonder.net-20170327011844-ahxwjtsyg6jfmacl
Fixup dealing with these stashed flags when built without EWMH.
Strictly speaking the whole block is a noop in that case, but it might
not always be, so take a little care about it.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1115
1115
        }
1116
1116
#endif
1117
1117
 
1118
 
        /* Initialize flags */
 
1118
        /*
 
1119
         * Initialize flags.  Right now, the only stashed flags are related
 
1120
         * to EWMH requests, so in a sense this whole thing could be dropped
 
1121
         * under #ifdef.  But I'll assume that might not always be the case,
 
1122
         * so for now the !(EWMH) case is just a twisty noop.
 
1123
         */
1119
1124
        {
1120
 
                bool gotflags;
1121
 
                unsigned aflags = OwlGetStashedAflags(owl, &gotflags);
 
1125
                bool gotflags = false;
 
1126
                unsigned aflags = 0, fromstash = 0;
 
1127
 
 
1128
                aflags = OwlGetStashedAflags(owl, &gotflags);
 
1129
 
 
1130
#ifdef EWMH
 
1131
                fromstash = (OTP_AFLAG_ABOVE | OTP_AFLAG_BELOW);
 
1132
#endif
1122
1133
 
1123
1134
                if(gotflags) {
1124
1135
                        /*
1125
1136
                         * Got stashed OTP flags; use 'em.  Explicitly mask in only
1126
 
                         * the above/below flags; the others aren't telling us info
1127
 
                         * we need to persist.
 
1137
                         * the flags we're caring about; the others aren't telling us
 
1138
                         * info we need to persist.
1128
1139
                         */
1129
 
                        aflags &= (OTP_AFLAG_ABOVE | OTP_AFLAG_BELOW);
 
1140
                        aflags &= fromstash;
1130
1141
                }
1131
1142
 
1132
1143
#ifdef EWMH
1145
1156
                                aflags |= OTP_AFLAG_BELOW;
1146
1157
                        }
1147
1158
                }
1148
 
#endif
 
1159
#endif // EWMH
1149
1160
 
1150
1161
                /* Set whatever we figured */
1151
1162
                owl->pri_aflags |= aflags;