diff options
author | Alexander Orzechowski <alex@ozal.ski> | 2023-12-06 14:28:59 -0500 |
---|---|---|
committer | Kirill Primak <vyivel@eclair.cafe> | 2024-01-18 18:36:54 +0300 |
commit | b38ed8b4792928dca3e1580e8160792ea41e25c4 (patch) | |
tree | b080710c7a3f37de868ff4d5d96e6971f7105675 /sway/input/cursor.c | |
parent | transaction: ready signals will return success bools (diff) | |
download | sway-b38ed8b4792928dca3e1580e8160792ea41e25c4.tar.gz sway-b38ed8b4792928dca3e1580e8160792ea41e25c4.tar.zst sway-b38ed8b4792928dca3e1580e8160792ea41e25c4.zip |
scene_graph: Port xdg_shell
Diffstat (limited to 'sway/input/cursor.c')
-rw-r--r-- | sway/input/cursor.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c index 30df76f4..fd8f50d4 100644 --- a/sway/input/cursor.c +++ b/sway/input/cursor.c | |||
@@ -80,6 +80,7 @@ struct sway_node *node_at_coords( | |||
80 | while (true) { | 80 | while (true) { |
81 | struct sway_container *con = scene_descriptor_try_get(current, | 81 | struct sway_container *con = scene_descriptor_try_get(current, |
82 | SWAY_SCENE_DESC_CONTAINER); | 82 | SWAY_SCENE_DESC_CONTAINER); |
83 | |||
83 | if (!con) { | 84 | if (!con) { |
84 | struct sway_view *view = scene_descriptor_try_get(current, | 85 | struct sway_view *view = scene_descriptor_try_get(current, |
85 | SWAY_SCENE_DESC_VIEW); | 86 | SWAY_SCENE_DESC_VIEW); |
@@ -88,12 +89,18 @@ struct sway_node *node_at_coords( | |||
88 | } | 89 | } |
89 | } | 90 | } |
90 | 91 | ||
91 | if (con) { | 92 | if (!con) { |
92 | if (!con->view || con->view->surface) { | 93 | struct sway_xdg_popup *popup = |
93 | return &con->node; | 94 | scene_descriptor_try_get(current, SWAY_SCENE_DESC_POPUP); |
95 | if (popup) { | ||
96 | con = popup->view->container; | ||
94 | } | 97 | } |
95 | } | 98 | } |
96 | 99 | ||
100 | if (con && (!con->view || con->view->surface)) { | ||
101 | return &con->node; | ||
102 | } | ||
103 | |||
97 | if (scene_descriptor_try_get(current, SWAY_SCENE_DESC_LAYER_SHELL)) { | 104 | if (scene_descriptor_try_get(current, SWAY_SCENE_DESC_LAYER_SHELL)) { |
98 | // We don't want to feed through the current workspace on | 105 | // We don't want to feed through the current workspace on |
99 | // layer shells | 106 | // layer shells |