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

ondropped does not work #1200

Open
rosshadden opened this issue Sep 17, 2024 Discussed in #1198 · 0 comments
Open

ondropped does not work #1200

rosshadden opened this issue Sep 17, 2024 Discussed in #1198 · 0 comments

Comments

@rosshadden
Copy link

Discussed in #1198

Originally posted by rosshadden September 16, 2024
I have tried many different times to get :ondropped working to no avail. Just simple things like :ondropped "notify-send foo bar" in an eventbox. I've searched github for path:.yuck ondropped and there are hardly any people using this feature, and most of us that are "using" it just have test notify-sends like me (my dotflies are one of the few results 😅).

Are there any special requirements for this to work that aren't mentioned in the docs, or is it just perhaps broken? dragvalue works great and I use it in a lot of places.

Making this into an issue after playing with it more.

Here is a minimal example:

(defwindow drag []
  :stacking "overlay"
  :focusable false
  :geometry (geometry :x "0px"
                      :y "0px"
                      :width "50%"
                      :height "32px"
                      :anchor "top left")
  (eventbox
    :dragtype "text"
    :dragvalue "dragons"
    "DRAG"))

(defwindow drop []
  :stacking "overlay"
  :focusable false
  :geometry (geometry :x "0px"
                      :y "0px"
                      :width "50%"
                      :height "32px"
                      :anchor "top right")
  (eventbox
    :ondropped "notify-send dropped {}"
    "DROP"))

As stated in the discussion thread, the drag eventbox works great and can be dragged to any text field. The dropped eventbox does not work at all. It does not fire when dropping the value from drag on it, and it does not fire when dropping arbitrary text on it from elsewhere either. I have tested with :dragtype "file" and I have tested with other :ondropped commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant