aboutsummaryrefslogtreecommitdiff
path: root/sway/tree/view.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-09-28 02:12:18 -0500
committerGitHub <noreply@github.com>2018-09-28 02:12:18 -0500
commit0b2afee7111c7f654c4920e6ef05bbf4ef7e89ec (patch)
treeadade49d798690cb5d47bd536432de40d4cbbcea /sway/tree/view.c
parent58af0015170204de6d186f0f25cd0b9315d062d7 (diff)
parent22412f57b06b1b344de0a5ccf2172b7bd10eadb9 (diff)
Merge pull request #2719 from RyanDwyer/fix-view-is-visible
Fix floating views in tabbed/stacked workspaces not getting frame events
Diffstat (limited to 'sway/tree/view.c')
-rw-r--r--sway/tree/view.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c
index e370443c..a024f325 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -989,12 +989,16 @@ bool view_is_visible(struct sway_view *view) {
floater = floater->parent;
}
bool is_sticky = container_is_floating(floater) && floater->is_sticky;
+ if (!is_sticky && !workspace_is_visible(workspace)) {
+ return false;
+ }
// Check view isn't in a tabbed or stacked container on an inactive tab
struct sway_seat *seat = input_manager_current_seat(input_manager);
struct sway_container *con = view->container;
while (con) {
enum sway_container_layout layout = container_parent_layout(con);
- if (layout == L_TABBED || layout == L_STACKED) {
+ if ((layout == L_TABBED || layout == L_STACKED)
+ && !container_is_floating(con)) {
struct sway_node *parent = con->parent ?
&con->parent->node : &con->workspace->node;
if (seat_get_active_tiling_child(seat, parent) != &con->node) {
@@ -1008,10 +1012,6 @@ bool view_is_visible(struct sway_view *view) {
!container_is_fullscreen_or_child(view->container)) {
return false;
}
- // Check the workspace is visible
- if (!is_sticky) {
- return workspace_is_visible(workspace);
- }
return true;
}