mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-30 00:15:58 +01:00
rootston: handle icon already being in the list
This commit is contained in:
parent
2d35e20691
commit
b8de0a29b4
1 changed files with 8 additions and 0 deletions
|
@ -319,6 +319,14 @@ static void handle_pointer_grab_begin(struct wl_listener *listener,
|
|||
if (grab->interface == &wlr_data_device_pointer_drag_interface) {
|
||||
struct wlr_drag *drag = grab->data;
|
||||
if (drag->icon) {
|
||||
struct roots_drag_icon *iter_icon;
|
||||
wl_list_for_each(iter_icon, &input->drag_icons, link) {
|
||||
if (iter_icon->surface == drag->icon) {
|
||||
// already in the list
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
struct roots_drag_icon *drag_icon =
|
||||
calloc(1, sizeof(struct roots_drag_icon));
|
||||
drag_icon->surface = drag->icon;
|
||||
|
|
Loading…
Reference in a new issue