mirror of
https://github.com/NickHu/sway
synced 2024-12-30 22:23:30 +01:00
fixed moving to other output and visibility
This commit is contained in:
parent
c3737e80ba
commit
9535305137
1 changed files with 2 additions and 1 deletions
|
@ -522,6 +522,7 @@ void set_view_visibility(swayc_t *view, void *data) {
|
||||||
}
|
}
|
||||||
bool visible = *(bool *)data;
|
bool visible = *(bool *)data;
|
||||||
if (view->type == C_VIEW) {
|
if (view->type == C_VIEW) {
|
||||||
|
wlc_view_set_output(view->handle, swayc_parent_by_type(view, C_OUTPUT)->handle);
|
||||||
wlc_view_set_mask(view->handle, visible ? VISIBLE : 0);
|
wlc_view_set_mask(view->handle, visible ? VISIBLE : 0);
|
||||||
if (visible) {
|
if (visible) {
|
||||||
wlc_view_bring_to_front(view->handle);
|
wlc_view_bring_to_front(view->handle);
|
||||||
|
@ -535,7 +536,7 @@ void set_view_visibility(swayc_t *view, void *data) {
|
||||||
|
|
||||||
void update_visibility(swayc_t *container) {
|
void update_visibility(swayc_t *container) {
|
||||||
swayc_t *ws = swayc_active_workspace_for(container);
|
swayc_t *ws = swayc_active_workspace_for(container);
|
||||||
bool visible = (ws->parent->focused == container);
|
bool visible = (ws->parent->focused == ws);
|
||||||
sway_log(L_DEBUG, "Setting visibility of container %p to %s", container, visible ? "visible" : "invisible");
|
sway_log(L_DEBUG, "Setting visibility of container %p to %s", container, visible ? "visible" : "invisible");
|
||||||
container_map(ws, set_view_visibility, &visible);
|
container_map(ws, set_view_visibility, &visible);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue