Commit Graph

11 Commits

Author SHA1 Message Date
Matthias Clasen
ceefe34027 gtkdragicon: Use drag surface api 2020-03-12 14:56:21 -04:00
Emmanuele Bassi
041043eec1 Fix introspection warnings for GtkDragIcon 2020-03-03 13:12:52 +00:00
Benjamin Otte
2a697827e1 dragicon: Add gtk_drag_icon_create_widget_for_value()
... and use it to set a drag icon.
2020-03-02 04:43:56 +01:00
Benjamin Otte
03882e1f96 dragicon: Change how to acquire drag icons
Before, gtk_drag_icon_new_for_drag() allowed creating new drag icons.
This could cause multiple drag icons to exist for a single drag.

Now, gtk_drag_icon_get_for_drag() makes sure that only one drag icon is
created.
2020-03-02 04:43:56 +01:00
Benjamin Otte
9efc4e6777 dragicon: Add GtkDragIcon::child 2020-03-02 04:43:56 +01:00
Benjamin Otte
f656cbdc5b Ensure all natives request at least a 1px wide surface
FIXME: Is this necessary?

Could the surfaces just clamp to 1x1 themselves?
We recently declared that surfaces can decide on whatever size they want
so natives need to inspect the size they requested anyway.
2020-02-22 05:50:07 +01:00
Matthias Clasen
10e4c04e61 Use style values directly
Replace uses of gtk_css_style_get_value with direct access,
throughout the tree. We don't replace all uses, just those
where we are dealing with a fixed property. Be careful to
handle the currentColor special case for color properties.
2020-01-29 11:07:32 +01:00
Matthias Clasen
f1ff69963e drag icon: Stop using style context getters
Just go to the css node directly.
2020-01-25 14:18:22 -05:00
Matthias Clasen
a51ee20ed9 dragicon: Add docs 2020-01-09 00:50:33 -05:00
Matthias Clasen
78832c65b5 Make GtkDragIcon public
This is needed if we want to use gdk_drag_begin
for one-off drags, without a GtkDragSource.
2020-01-08 18:48:21 -05:00
Matthias Clasen
a6244a95be Add GtkDragIcon
This is a GtkRoot implemntation for drag icons,
using the surface provided by GdkDrag. This lets
us avoid GTK_WINDOW_POPUP and
gtk_window_set_hardcoded_surface.
2019-12-30 00:28:02 -05:00