aboutsummaryrefslogtreecommitdiff
path: root/sway/desktop/output.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-08-02 09:46:53 -0400
committerGitHub <noreply@github.com>2018-08-02 09:46:53 -0400
commit3eda76de4869984eed7b9476b9e011b6981ecbe5 (patch)
treebecf792130769384e5a104cef540b1f2d7da00b4 /sway/desktop/output.c
parentea14ef40955a94e21a5198d2469e54fe1e6056e5 (diff)
parent787f08da7ff9ecb325def2e3a44dc5043d7e2753 (diff)
Merge pull request #2407 from RyanDwyer/fix-popups-v3
Fix popups v3
Diffstat (limited to 'sway/desktop/output.c')
-rw-r--r--sway/desktop/output.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c
index 31b53213..66747a3f 100644
--- a/sway/desktop/output.c
+++ b/sway/desktop/output.c
@@ -119,7 +119,7 @@ static void output_for_each_surface_iterator(struct wlr_surface *surface,
data->user_data);
}
-static void output_surface_for_each_surface(struct sway_output *output,
+void output_surface_for_each_surface(struct sway_output *output,
struct wlr_surface *surface, double ox, double oy,
sway_surface_iterator_func_t iterator, void *user_data) {
struct surface_iterator_data data = {
@@ -155,6 +155,23 @@ void output_view_for_each_surface(struct sway_output *output,
output_for_each_surface_iterator, &data);
}
+void output_view_for_each_popup(struct sway_output *output,
+ struct sway_view *view, sway_surface_iterator_func_t iterator,
+ void *user_data) {
+ struct surface_iterator_data data = {
+ .user_iterator = iterator,
+ .user_data = user_data,
+ .output = output,
+ .ox = view->swayc->current.view_x - output->swayc->current.swayc_x,
+ .oy = view->swayc->current.view_y - output->swayc->current.swayc_y,
+ .width = view->swayc->current.view_width,
+ .height = view->swayc->current.view_height,
+ .rotation = 0, // TODO
+ };
+
+ view_for_each_popup(view, output_for_each_surface_iterator, &data);
+}
+
void output_layer_for_each_surface(struct sway_output *output,
struct wl_list *layer_surfaces, sway_surface_iterator_func_t iterator,
void *user_data) {