diff options
author | Drew DeVault <sir@cmpwn.com> | 2015-08-19 07:14:03 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2015-08-19 07:14:03 -0400 |
commit | 8fb2e7e34e279a005a4d42e224f71f9b35ddf918 (patch) | |
tree | a04cc657974f755360c5102a88c908a5160f61cd /sway/workspace.c | |
parent | Merge pull request #80 from SyedAmerGilani/fix_memory_leaks (diff) | |
parent | fixed some more bugs, moved layout_log into log.ch, restored focus_parent (diff) | |
download | sway-8fb2e7e34e279a005a4d42e224f71f9b35ddf918.tar.gz sway-8fb2e7e34e279a005a4d42e224f71f9b35ddf918.tar.zst sway-8fb2e7e34e279a005a4d42e224f71f9b35ddf918.zip |
Merge pull request #79 from taiyu-len/master
fixed floating_modifier related things
Diffstat (limited to 'sway/workspace.c')
-rw-r--r-- | sway/workspace.c | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/sway/workspace.c b/sway/workspace.c index 180c8a66..a690e3ae 100644 --- a/sway/workspace.c +++ b/sway/workspace.c | |||
@@ -187,60 +187,3 @@ void workspace_switch(swayc_t *workspace) { | |||
187 | set_focused_container(get_focused_view(workspace)); | 187 | set_focused_container(get_focused_view(workspace)); |
188 | arrange_windows(workspace, -1, -1); | 188 | arrange_windows(workspace, -1, -1); |
189 | } | 189 | } |
190 | |||
191 | /* XXX:DEBUG:XXX */ | ||
192 | static void container_log(const swayc_t *c) { | ||
193 | fprintf(stderr, "focus:%c|", | ||
194 | c->is_focused ? 'F' : //Focused | ||
195 | c == active_workspace ? 'W' : //active workspace | ||
196 | c == &root_container ? 'R' : //root | ||
197 | 'X');//not any others | ||
198 | fprintf(stderr,"(%p)",c); | ||
199 | fprintf(stderr,"(p:%p)",c->parent); | ||
200 | fprintf(stderr,"(f:%p)",c->focused); | ||
201 | fprintf(stderr,"(h:%ld)",c->handle); | ||
202 | fprintf(stderr,"Type:"); | ||
203 | fprintf(stderr, | ||
204 | c->type == C_ROOT ? "Root|" : | ||
205 | c->type == C_OUTPUT ? "Output|" : | ||
206 | c->type == C_WORKSPACE ? "Workspace|" : | ||
207 | c->type == C_CONTAINER ? "Container|" : | ||
208 | c->type == C_VIEW ? "View|" : "Unknown|"); | ||
209 | fprintf(stderr,"layout:"); | ||
210 | fprintf(stderr, | ||
211 | c->layout == L_NONE ? "NONE|" : | ||
212 | c->layout == L_HORIZ ? "Horiz|": | ||
213 | c->layout == L_VERT ? "Vert|": | ||
214 | c->layout == L_STACKED ? "Stacked|": | ||
215 | c->layout == L_FLOATING ? "Floating|": | ||
216 | "Unknown|"); | ||
217 | fprintf(stderr, "w:%d|h:%d|", c->width, c->height); | ||
218 | fprintf(stderr, "x:%d|y:%d|", c->x, c->y); | ||
219 | fprintf(stderr, "vis:%c|", c->visible?'t':'f'); | ||
220 | fprintf(stderr, "wgt:%d|", c->weight); | ||
221 | fprintf(stderr, "name:%.16s|", c->name); | ||
222 | fprintf(stderr, "children:%d\n",c->children?c->children->length:0); | ||
223 | } | ||
224 | void layout_log(const swayc_t *c, int depth) { | ||
225 | int i, d; | ||
226 | int e = c->children ? c->children->length : 0; | ||
227 | container_log(c); | ||
228 | if (e) { | ||
229 | for (i = 0; i < e; ++i) { | ||
230 | fputc('|',stderr); | ||
231 | for (d = 0; d < depth; ++d) fputc('-', stderr); | ||
232 | layout_log(c->children->items[i], depth + 1); | ||
233 | } | ||
234 | } | ||
235 | if (c->type == C_WORKSPACE) { | ||
236 | e = c->floating?c->floating->length:0; | ||
237 | if (e) { | ||
238 | for (i = 0; i < e; ++i) { | ||
239 | fputc('|',stderr); | ||
240 | for (d = 0; d < depth; ++d) fputc('-', stderr); | ||
241 | layout_log(c->floating->items[i], depth + 1); | ||
242 | } | ||
243 | } | ||
244 | } | ||
245 | } | ||
246 | /* XXX:DEBUG:XXX */ | ||