Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drag and drop (dnd) through resize zone #1795

Open
Arnaudv6 opened this issue May 11, 2024 · 6 comments
Open

drag and drop (dnd) through resize zone #1795

Arnaudv6 opened this issue May 11, 2024 · 6 comments
Labels
enhancement New feature or request UX User Experience issues
Milestone

Comments

@Arnaudv6
Copy link
Contributor

In v0.7.2, when dragging from one view to another,
(with source view having shadows and overlapping on destination view)
user can't drop through (overlapping) source view's shadow to destination view.

@Consolatis
Copy link
Member

Is this for client side decorations or server side ones?

Server side shadows should not exist in terms of hitbox detection, e.g. dropping something there should land on whatever is behind those shadows.

@Arnaudv6
Copy link
Contributor Author

Both CSD ((gthumb) and SSD (thunar).
Maybe source windows's shadow are not hitboxes, but they're "opaque": window bellow don't receive drops through them.
screenshot_2024-05-19-18:45:04.webm

@johanmalm
Copy link
Collaborator

Feels like there are two options:

  1. Decide that DND doesn't work through drop-shadows
  2. Overload get_cursor_context() to optionally ignore SSD drop-shadows. It's possible this could be done for CSD, but is likely to be hacky.

I prefer (1).

The disadvantage of (2) it may result in different behaviors depending on SSD/CSD, and it add complexity to an already complex code-path (get_cursor_context())

Ref:

@Consolatis
Copy link
Member

Consolatis commented May 19, 2024

SSD shadows should really not get detected:

scene_buf->point_accepts_input = never_accepts_input;

-> https://gitlab.freedesktop.org/wlroots/wlroots/-/blob/0.17/types/scene/wlr_scene.c?ref_type=heads#L1059-1106

Maybe this is actually about the invisible resize area?
@Arnaudv6 does the same happen with server side decorations when you disable shadows?

@Arnaudv6
Copy link
Contributor Author

@Consolatis yes it does, good catch, sorry my bug was unspecific

@Arnaudv6 Arnaudv6 changed the title drag and drop (dnd) through shadows drag and drop (dnd) through resize zone May 20, 2024
@Consolatis
Copy link
Member

Hm.. we need to detect the invisible resize area to well, resize the window.

Maybe we can either disable it or also set point_accepts_input temporarily when in dnd mode. As far as I remember we do have a function that disables the dnd icon surface during hitbox detection already so we could likely hook into there.

@Consolatis Consolatis added enhancement New feature or request UX User Experience issues labels May 20, 2024
@Consolatis Consolatis added this to the 0.7.3 milestone May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request UX User Experience issues
Projects
None yet
Development

No branches or pull requests

3 participants