diff options
author | Drew DeVault <sir@cmpwn.com> | 2019-01-30 09:36:42 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-30 09:36:42 -0500 |
commit | 41af8d845933f2bc6b158d0cac5a0c5688cce7d0 (patch) | |
tree | 35cfc896a7dc98097333aebf40eedc2f288722a9 /rootston/output.c | |
parent | a37dfb380b4d519f943e23ee69671aa64b098ecf (diff) | |
parent | 29952dee19c030d2ae1034e0304de72a645b4444 (diff) |
Merge pull request #1513 from emersion/fix-dnd
data-device: fix drag-and-drop
Diffstat (limited to 'rootston/output.c')
-rw-r--r-- | rootston/output.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/rootston/output.c b/rootston/output.c index df8328dd..3aad1c06 100644 --- a/rootston/output.c +++ b/rootston/output.c @@ -120,15 +120,14 @@ static void drag_icons_for_each_surface(struct roots_input *input, void *user_data) { struct roots_seat *seat; wl_list_for_each(seat, &input->seats, link) { - struct roots_drag_icon *drag_icon; - wl_list_for_each(drag_icon, &seat->drag_icons, link) { - if (!drag_icon->wlr_drag_icon->mapped) { - continue; - } - surface_for_each_surface(drag_icon->wlr_drag_icon->surface, - drag_icon->x, drag_icon->y, 0, layout_data, - iterator, user_data); + struct roots_drag_icon *drag_icon = seat->drag_icon; + if (drag_icon == NULL || !drag_icon->wlr_drag_icon->mapped) { + continue; } + + surface_for_each_surface(drag_icon->wlr_drag_icon->surface, + drag_icon->x, drag_icon->y, 0, layout_data, + iterator, user_data); } } |