[PATCH weston 3/5] client: Add DnD cursors to the managed cursors list
That way we'll be able to set the corresponding pointer surface to a current DnD operation. Signed-off-by: Carlos GarnachoReviewed-by: Jonas Ådahl --- clients/window.c | 16 clients/window.h | 3 +++ 2 files changed, 19 insertions(+) diff --git a/clients/window.c b/clients/window.c index 3e5885e..e9e8de9 100644 --- a/clients/window.c +++ b/clients/window.c @@ -1261,6 +1261,19 @@ static const char *watches[] = { "0426c94ea35c87780ff01dc239897213" }; +static const char *move_draggings[] = { + "dnd-move" +}; + +static const char *copy_draggings[] = { + "dnd-copy" +}; + +static const char *forbidden_draggings[] = { + "dnd-none", + "dnd-no-drop" +}; + struct cursor_alternatives { const char **names; size_t count; @@ -1280,6 +1293,9 @@ static const struct cursor_alternatives cursors[] = { {xterms, ARRAY_LENGTH(xterms)}, {hand1s, ARRAY_LENGTH(hand1s)}, {watches, ARRAY_LENGTH(watches)}, + {move_draggings, ARRAY_LENGTH(move_draggings)}, + {copy_draggings, ARRAY_LENGTH(copy_draggings)}, + {forbidden_draggings, ARRAY_LENGTH(forbidden_draggings)}, }; static void diff --git a/clients/window.h b/clients/window.h index 74a2c72..d54bf79 100644 --- a/clients/window.h +++ b/clients/window.h @@ -192,6 +192,9 @@ enum cursor_type { CURSOR_IBEAM, CURSOR_HAND1, CURSOR_WATCH, + CURSOR_DND_MOVE, + CURSOR_DND_COPY, + CURSOR_DND_FORBIDDEN, CURSOR_BLANK }; -- 2.5.0 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH weston 3/5] client: Add DnD cursors to the managed cursors list
Hey Bryce :), On Sat, Jan 16, 2016 at 12:13 AM, Bryce Harringtonwrote: > On Fri, Jan 15, 2016 at 09:14:25PM +0100, Carlos Garnacho wrote: >> That way we'll be able to set the corresponding pointer surface to >> a current DnD operation. >> >> Signed-off-by: Carlos Garnacho >> Reviewed-by: Jonas Ådahl >> --- >> clients/window.c | 16 >> clients/window.h | 3 +++ >> 2 files changed, 19 insertions(+) >> >> diff --git a/clients/window.c b/clients/window.c >> index 3e5885e..e9e8de9 100644 >> --- a/clients/window.c >> +++ b/clients/window.c >> @@ -1261,6 +1261,19 @@ static const char *watches[] = { >> "0426c94ea35c87780ff01dc239897213" >> }; >> >> +static const char *move_draggings[] = { >> + "dnd-move" >> +}; > > Any reason this must be 'draggings' rather than 'drags'? Maybe not a big one, "drags" sounded too much like ongoing action/state to me. The naming scheme for these arrays is somewhat unfortunate, it feels more natural to invert the name here, but "drag_moves" or "dnd_moves" sounds equally awkward. Suffixing "_cursors" in these would make for better names IMO, like dnd_move_cursors. Cheers, Carlos ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH weston 3/5] client: Add DnD cursors to the managed cursors list
On Fri, Jan 15, 2016 at 09:14:25PM +0100, Carlos Garnacho wrote: > That way we'll be able to set the corresponding pointer surface to > a current DnD operation. > > Signed-off-by: Carlos Garnacho> Reviewed-by: Jonas Ådahl > --- > clients/window.c | 16 > clients/window.h | 3 +++ > 2 files changed, 19 insertions(+) > > diff --git a/clients/window.c b/clients/window.c > index 3e5885e..e9e8de9 100644 > --- a/clients/window.c > +++ b/clients/window.c > @@ -1261,6 +1261,19 @@ static const char *watches[] = { > "0426c94ea35c87780ff01dc239897213" > }; > > +static const char *move_draggings[] = { > + "dnd-move" > +}; Any reason this must be 'draggings' rather than 'drags'? > +static const char *copy_draggings[] = { > + "dnd-copy" > +}; > + > +static const char *forbidden_draggings[] = { > + "dnd-none", > + "dnd-no-drop" > +}; > + > struct cursor_alternatives { > const char **names; > size_t count; > @@ -1280,6 +1293,9 @@ static const struct cursor_alternatives cursors[] = { > {xterms, ARRAY_LENGTH(xterms)}, > {hand1s, ARRAY_LENGTH(hand1s)}, > {watches, ARRAY_LENGTH(watches)}, > + {move_draggings, ARRAY_LENGTH(move_draggings)}, > + {copy_draggings, ARRAY_LENGTH(copy_draggings)}, > + {forbidden_draggings, ARRAY_LENGTH(forbidden_draggings)}, > }; > > static void > diff --git a/clients/window.h b/clients/window.h > index 74a2c72..d54bf79 100644 > --- a/clients/window.h > +++ b/clients/window.h > @@ -192,6 +192,9 @@ enum cursor_type { > CURSOR_IBEAM, > CURSOR_HAND1, > CURSOR_WATCH, > + CURSOR_DND_MOVE, > + CURSOR_DND_COPY, > + CURSOR_DND_FORBIDDEN, > > CURSOR_BLANK > }; > -- > 2.5.0 > > ___ > wayland-devel mailing list > wayland-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/wayland-devel ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH weston 3/5] client: Add DnD cursors to the managed cursors list
That way we'll be able to set the corresponding pointer surface to a current DnD operation. Signed-off-by: Carlos GarnachoReviewed-by: Jonas Ådahl --- clients/window.c | 16 clients/window.h | 3 +++ 2 files changed, 19 insertions(+) diff --git a/clients/window.c b/clients/window.c index 9c67b91..4666bb9 100644 --- a/clients/window.c +++ b/clients/window.c @@ -1266,6 +1266,19 @@ static const char *watches[] = { "0426c94ea35c87780ff01dc239897213" }; +static const char *move_draggings[] = { + "dnd-move" +}; + +static const char *copy_draggings[] = { + "dnd-copy" +}; + +static const char *forbidden_draggings[] = { + "dnd-none", + "dnd-no-drop" +}; + struct cursor_alternatives { const char **names; size_t count; @@ -1285,6 +1298,9 @@ static const struct cursor_alternatives cursors[] = { {xterms, ARRAY_LENGTH(xterms)}, {hand1s, ARRAY_LENGTH(hand1s)}, {watches, ARRAY_LENGTH(watches)}, + {move_draggings, ARRAY_LENGTH(move_draggings)}, + {copy_draggings, ARRAY_LENGTH(copy_draggings)}, + {forbidden_draggings, ARRAY_LENGTH(forbidden_draggings)}, }; static void diff --git a/clients/window.h b/clients/window.h index b61a62a..1200f01 100644 --- a/clients/window.h +++ b/clients/window.h @@ -189,6 +189,9 @@ enum cursor_type { CURSOR_IBEAM, CURSOR_HAND1, CURSOR_WATCH, + CURSOR_DND_MOVE, + CURSOR_DND_COPY, + CURSOR_DND_FORBIDDEN, CURSOR_BLANK }; -- 2.5.0 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH weston 3/5] client: Add DnD cursors to the managed cursors list
On Tue, Dec 22, 2015 at 02:33:29AM +0100, Carlos Garnacho wrote: > That way we'll be able to set the corresponding pointer surface to > a current DnD operation. > > Signed-off-by: Carlos Garnacho> Reviewed-by: Jonas Ådahl Seems here and in 5/5 the "@" somewhere turned into " at ". Did you maybe copy it from the mailing list archive? Jonas > --- > clients/window.c | 16 > clients/window.h | 3 +++ > 2 files changed, 19 insertions(+) > > diff --git a/clients/window.c b/clients/window.c > index 9c67b91..4666bb9 100644 > --- a/clients/window.c > +++ b/clients/window.c > @@ -1266,6 +1266,19 @@ static const char *watches[] = { > "0426c94ea35c87780ff01dc239897213" > }; > > +static const char *move_draggings[] = { > + "dnd-move" > +}; > + > +static const char *copy_draggings[] = { > + "dnd-copy" > +}; > + > +static const char *forbidden_draggings[] = { > + "dnd-none", > + "dnd-no-drop" > +}; > + > struct cursor_alternatives { > const char **names; > size_t count; > @@ -1285,6 +1298,9 @@ static const struct cursor_alternatives cursors[] = { > {xterms, ARRAY_LENGTH(xterms)}, > {hand1s, ARRAY_LENGTH(hand1s)}, > {watches, ARRAY_LENGTH(watches)}, > + {move_draggings, ARRAY_LENGTH(move_draggings)}, > + {copy_draggings, ARRAY_LENGTH(copy_draggings)}, > + {forbidden_draggings, ARRAY_LENGTH(forbidden_draggings)}, > }; > > static void > diff --git a/clients/window.h b/clients/window.h > index b61a62a..1200f01 100644 > --- a/clients/window.h > +++ b/clients/window.h > @@ -189,6 +189,9 @@ enum cursor_type { > CURSOR_IBEAM, > CURSOR_HAND1, > CURSOR_WATCH, > + CURSOR_DND_MOVE, > + CURSOR_DND_COPY, > + CURSOR_DND_FORBIDDEN, > > CURSOR_BLANK > }; > -- > 2.5.0 > > ___ > wayland-devel mailing list > wayland-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/wayland-devel ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH weston 3/5] client: Add DnD cursors to the managed cursors list
That way we'll be able to set the corresponding pointer surface to a current DnD operation. Signed-off-by: Carlos GarnachoReviewed-by: Jonas Ådahl --- clients/window.c | 16 clients/window.h | 3 +++ 2 files changed, 19 insertions(+) diff --git a/clients/window.c b/clients/window.c index 9c67b91..4666bb9 100644 --- a/clients/window.c +++ b/clients/window.c @@ -1266,6 +1266,19 @@ static const char *watches[] = { "0426c94ea35c87780ff01dc239897213" }; +static const char *move_draggings[] = { + "dnd-move" +}; + +static const char *copy_draggings[] = { + "dnd-copy" +}; + +static const char *forbidden_draggings[] = { + "dnd-none", + "dnd-no-drop" +}; + struct cursor_alternatives { const char **names; size_t count; @@ -1285,6 +1298,9 @@ static const struct cursor_alternatives cursors[] = { {xterms, ARRAY_LENGTH(xterms)}, {hand1s, ARRAY_LENGTH(hand1s)}, {watches, ARRAY_LENGTH(watches)}, + {move_draggings, ARRAY_LENGTH(move_draggings)}, + {copy_draggings, ARRAY_LENGTH(copy_draggings)}, + {forbidden_draggings, ARRAY_LENGTH(forbidden_draggings)}, }; static void diff --git a/clients/window.h b/clients/window.h index b61a62a..1200f01 100644 --- a/clients/window.h +++ b/clients/window.h @@ -189,6 +189,9 @@ enum cursor_type { CURSOR_IBEAM, CURSOR_HAND1, CURSOR_WATCH, + CURSOR_DND_MOVE, + CURSOR_DND_COPY, + CURSOR_DND_FORBIDDEN, CURSOR_BLANK }; -- 2.5.0 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH weston 3/5] client: Add DnD cursors to the managed cursors list
That way we'll be able to set the corresponding pointer surface to a current DnD operation. Signed-off-by: Carlos Garnacho--- clients/window.c | 16 clients/window.h | 3 +++ 2 files changed, 19 insertions(+) diff --git a/clients/window.c b/clients/window.c index 9d1e8b3..44e5ce4 100644 --- a/clients/window.c +++ b/clients/window.c @@ -1266,6 +1266,19 @@ static const char *watches[] = { "0426c94ea35c87780ff01dc239897213" }; +static const char *move_draggings[] = { + "dnd-move" +}; + +static const char *copy_draggings[] = { + "dnd-copy" +}; + +static const char *forbidden_draggings[] = { + "dnd-none", + "dnd-no-drop" +}; + struct cursor_alternatives { const char **names; size_t count; @@ -1285,6 +1298,9 @@ static const struct cursor_alternatives cursors[] = { {xterms, ARRAY_LENGTH(xterms)}, {hand1s, ARRAY_LENGTH(hand1s)}, {watches, ARRAY_LENGTH(watches)}, + {move_draggings, ARRAY_LENGTH(move_draggings)}, + {copy_draggings, ARRAY_LENGTH(copy_draggings)}, + {forbidden_draggings, ARRAY_LENGTH(forbidden_draggings)}, }; static void diff --git a/clients/window.h b/clients/window.h index b61a62a..1200f01 100644 --- a/clients/window.h +++ b/clients/window.h @@ -189,6 +189,9 @@ enum cursor_type { CURSOR_IBEAM, CURSOR_HAND1, CURSOR_WATCH, + CURSOR_DND_MOVE, + CURSOR_DND_COPY, + CURSOR_DND_FORBIDDEN, CURSOR_BLANK }; -- 2.5.0 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH weston 3/5] client: Add DnD cursors to the managed cursors list
On Tue, Dec 15, 2015 at 06:56:25PM +0100, Carlos Garnacho wrote: > That way we'll be able to set the corresponding pointer surface to > a current DnD operation. > > Signed-off-by: Carlos GarnachoReviewed-by: Jonas Ådahl > --- > clients/window.c | 16 > clients/window.h | 3 +++ > 2 files changed, 19 insertions(+) > > diff --git a/clients/window.c b/clients/window.c > index 9d1e8b3..44e5ce4 100644 > --- a/clients/window.c > +++ b/clients/window.c > @@ -1266,6 +1266,19 @@ static const char *watches[] = { > "0426c94ea35c87780ff01dc239897213" > }; > > +static const char *move_draggings[] = { > + "dnd-move" > +}; > + > +static const char *copy_draggings[] = { > + "dnd-copy" > +}; > + > +static const char *forbidden_draggings[] = { > + "dnd-none", > + "dnd-no-drop" > +}; > + > struct cursor_alternatives { > const char **names; > size_t count; > @@ -1285,6 +1298,9 @@ static const struct cursor_alternatives cursors[] = { > {xterms, ARRAY_LENGTH(xterms)}, > {hand1s, ARRAY_LENGTH(hand1s)}, > {watches, ARRAY_LENGTH(watches)}, > + {move_draggings, ARRAY_LENGTH(move_draggings)}, > + {copy_draggings, ARRAY_LENGTH(copy_draggings)}, > + {forbidden_draggings, ARRAY_LENGTH(forbidden_draggings)}, > }; > > static void > diff --git a/clients/window.h b/clients/window.h > index b61a62a..1200f01 100644 > --- a/clients/window.h > +++ b/clients/window.h > @@ -189,6 +189,9 @@ enum cursor_type { > CURSOR_IBEAM, > CURSOR_HAND1, > CURSOR_WATCH, > + CURSOR_DND_MOVE, > + CURSOR_DND_COPY, > + CURSOR_DND_FORBIDDEN, > > CURSOR_BLANK > }; > -- > 2.5.0 > > ___ > wayland-devel mailing list > wayland-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/wayland-devel ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel