Commit Graph

14 Commits

Author SHA1 Message Date
Matthias Clasen
8653a5e27b dragicon: Derive from GtkWidget
This wasn't meant to derive from GtkContainer.
2020-05-01 14:24:21 -04:00
Matthias Clasen
632524f679 Reinstate expected focus behavior
After the :can-focus change in the previous commit, widgets
need to set suitable focus and grab_focus implementations
to implement the desired focus behavior.

This commit does that for all widgets.
2020-04-09 17:50:29 -04:00
Matthias Clasen
a65fd81106 root: Reorganize focus handling
Make :focus-widget a GtkWindow property and add vfuncs
to the GtkRoot interface instead of the property.
2020-04-09 17:50:28 -04:00
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