@ -520,16 +520,25 @@ void set_view_visibility(swayc_t *view, void *data) {
if ( ! ASSERT_NONNULL ( view ) ) {
if ( ! ASSERT_NONNULL ( view ) ) {
return ;
return ;
}
}
uint32_t * p = data ;
uint32_t mask = * ( uint32_t * ) data ;
if ( view - > type = = C_VIEW ) {
if ( view - > type = = C_VIEW ) {
wlc_view_set_mask ( view - > handle , * p ) ;
wlc_view_set_mask ( view - > handle , mask ) ;
if ( * p = = 2 ) {
if ( mask & VISIBLE ) {
wlc_view_bring_to_front ( view - > handle ) ;
wlc_view_bring_to_front ( view - > handle ) ;
} else {
} else {
wlc_view_send_to_back ( view - > handle ) ;
wlc_view_send_to_back ( view - > handle ) ;
}
}
}
}
view - > visible = ( * p = = 2 ) ;
view - > visible = mask & VISIBLE ;
sway_log ( L_DEBUG , " Container %p is now %s " , view , 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 ;
sway_log ( L_DEBUG , " Setting visibility of container %p to %s " , container , visible ? " visible " : " invisible " ) ;
container_map ( ws , set_view_visibility , & mask ) ;
}
}
void reset_gaps ( swayc_t * view , void * data ) {
void reset_gaps ( swayc_t * view , void * data ) {