wayland::serv...ger_dnd_action(3)

πŸ’… NAME πŸ’…

okay so bestie, gather round β€” wayland::server::data_device_manager_dnd_action is literally just drag and drop actions. that's the whole vibe. it's the little enum-ish thingy that holds the drag-and-drop action flags for the Wayland++ server side. periodt. ✨

ps this page lives in the Wayland++ manual, section 3 (library calls, for the uninitiated 🫢).


🌸 SYNOPSIS 🌸

#include <wayland-server-protocol.hpp>

✨ Static Public Attributes ✨

these are all static const, they all live in the same wayland::detail::bitfield< 3, 6 > type, and none of them are gonna change on you. iconic behavior honestly πŸ‘‘

  • static const wayland::detail::bitfield< 3, 6 > none β€” no action 🚫
  • static const wayland::detail::bitfield< 3, 6 > copy β€” copy action πŸ“‹
  • static const wayland::detail::bitfield< 3, 6 > move β€” move action 🚚
  • static const wayland::detail::bitfield< 3, 6 > ask β€” ask action ❓

πŸ¦‹ Detailed Description πŸ¦‹

drag and drop actions. yes, that's the whole description again, but here's the tea β˜•:

this is a bitmask of the available/preferred actions in a drag-and-drop operation. so like, all the possible vibes a drag could have, packed into one cute little integer. ngl that's efficient of them.

in the compositor, the selected action is a result of matching the actions offered by the source and destination sides. so both sides gotta agree, it's giving consent-based dragging fr fr 🫢

"action" events with a "none" action will be sent to both source and destination if there's no match. no match, no slay, everybody hears about it 😭. all further checks will effectively happen on (source actions ∩ destination actions) β€” that ∩ is a set intersection bestie, it's the overlap, the shared taste, the actual compatibility πŸ’–.

in addition, compositors may also pick different actions in reaction to key modifiers being pressed. one common design that's used in major toolkits (and the behavior recommended for compositors) is:

  • if no modifiers are pressed, the first match (in bit order) will be used.
  • pressing Shift selects "move", if enabled in the mask.
  • pressing Control selects "copy", if enabled in the mask.
⚠️ behavior beyond that is considered implementation-dependent. do not come for me if your compositor does its own thing, that's literally allowed.

compositors may for example bind other modifiers (like Alt/Meta) or drags initiated with other buttons than BTN_LEFT to specific actions (e.g. "ask"). so yeah, the spec said "you do you bestie" on that one 🌈

Definition at line 1639 of file wayland-server-protocol.hpp. (yes we cite our sources in this house πŸ’…)


πŸŽ€ Member Data Documentation πŸŽ€

all four of these are const wayland::detail::bitfield<3, 6> and [static], so they belong to the class itself, not to any one instance. look at them go πŸ₯Ή

const wayland::detail::bitfield<3, 6> wayland::server::data_device_manager_dnd_action::ask [static]

ask action.

Definition at line 1652 of file wayland-server-protocol.hpp.

const wayland::detail::bitfield<3, 6> wayland::server::data_device_manager_dnd_action::copy [static]

copy action.

Definition at line 1648 of file wayland-server-protocol.hpp.

const wayland::detail::bitfield<3, 6> wayland::server::data_device_manager_dnd_action::move [static]

move action.

Definition at line 1650 of file wayland-server-protocol.hpp.

const wayland::detail::bitfield<3, 6> wayland::server::data_device_manager_dnd_action::none [static]

no action.

Definition at line 1646 of file wayland-server-protocol.hpp.

πŸ’€ not the member docs being filed in alphabetical order while the line numbers go 1652, 1648, 1650, 1646 β€” the way they sorted the docs but not the lines is so unserious. anyway. all facts intact, we move. 🚚

πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for Wayland++ from the source code. so nobody wrote this by hand, a robot did it, and honestly? the robot ate πŸ€–βœ¨


and that's the whole page bestie!! πŸ’œ this one's from Wayland++, version 1.0.1, and it was dated Fri Mar 27 2026. go forth and drag responsibly, mwah πŸ’…πŸ’–πŸŒΈ

πŸ“¦ where this page comes from