diff options
author | minus <[email protected]> | 2015-08-25 20:13:35 +0200 |
---|---|---|
committer | minus <[email protected]> | 2015-08-25 20:13:35 +0200 |
commit | ca89ba83a8adf392ba3409f18d3af2545d69b034 (patch) | |
tree | 9b94c93270737625c17bde12669b67bd14385577 /sway/container.c | |
parent | e533014201475648df24c1c74dbf04de65a9d16c (diff) |
changed view visibility to be bool
view_visibility enum remains with one constant that is the mask to wlc's view masking
Diffstat (limited to 'sway/container.c')
-rw-r--r-- | sway/container.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/sway/container.c b/sway/container.c index 666d6a2c..acce050f 100644 --- a/sway/container.c +++ b/sway/container.c @@ -520,25 +520,24 @@ void set_view_visibility(swayc_t *view, void *data) { if (!ASSERT_NONNULL(view)) { return; } - uint32_t mask = *(uint32_t *)data; + bool visible = *(bool *)data; if (view->type == C_VIEW) { - wlc_view_set_mask(view->handle, mask); - if (mask & VISIBLE) { + wlc_view_set_mask(view->handle, visible ? VISIBLE : 0); + if (visible) { wlc_view_bring_to_front(view->handle); } else { wlc_view_send_to_back(view->handle); } } - view->visible = mask & VISIBLE; - sway_log(L_DEBUG, "Container %p is now %s", view, view->visible ? "visible" : "invisible"); + view->visible = visible; + sway_log(L_DEBUG, "Container %p is now %s", view, visible ? "visible" : "invisible"); } void update_visibility(swayc_t *container) { swayc_t *ws = swayc_active_workspace_for(container); - bool visible = ws->parent->focused == container; - uint32_t mask = visible ? VISIBLE : INVISIBLE; + bool visible = (ws->parent->focused == container); sway_log(L_DEBUG, "Setting visibility of container %p to %s", container, visible ? "visible" : "invisible"); - container_map(ws, set_view_visibility, &mask); + container_map(ws, set_view_visibility, &visible); } void reset_gaps(swayc_t *view, void *data) { |