We have event controller apis to replace these.
There is one remaining use of gtk_get_current_event_time
in gtkwindow.c, so we can't drop the implementation yet.
Add a section in the migration guide for this.
This commit handles complicated cases where we selections.
We handle this by adding extend and modify parameters to
the ::move-cursor signals, and adjust the bindings
accordingly.
We don't really have an event anywhere close in most
cases, and we already pass GDK_CURRENT_TIME in half
the cases anyway.
If we want to be serious about this, we need to pass
the event itself, since future focus-stealing protocols
may not rely on just a timestamp.
We need to unset the propagation limit on the focus
controller, else we miss the focus-in when the focus
enters the popover upon initial popup, when it comes
from the parent button.
Add a .link style class on labels that contain links,
so we can avoid the focus outline around the label
when individual links are focused, and use the link
node when rendering the focus on links.
Make GtkScaleButton a widget that has a toggle button
as a child, just like all the other button widgets now.
The immediate benefit of this arrangement is to avoid
the "double focus" problem when we pop up the popup.
Update accessible, demos and tests to match.
The :can-focus property is no longer very useful to
give an indication of what is focusable, since it is
TRUE for almost all widgets now. Patch things up
to by looking at known widget types.
This is one of the situations, where can-focus can still
be used to tweak focus behavior of leaf widgets. Color
swatches are focusable by default to allow selecting colors
with the keyboard. But when used as color samples, they
should not take focus.
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.
Make widgets can-focus by default, and change the semantics
of can-focus to be recursive . If it is set to FALSE, focus
can not enter the widget or its descendents at all anymore.
This commit temporarily breaks focus behavior of widgets
that did not expect to receive focus.
The only place where this should be set is when making
a widget the focus-widget of a window. We still keep
the property around in readonly form, since there are
a few places where we rely on property notification
for it.
This property doesn't carry any new information compared
to GtkWindow:focus-widget. We still keep the gtk_widget_is_focus
getter, as a convenient shortcut.
Make gtk_window_set_focus call gtk_widget_grab_focus internally.
This means that set_focus can now end up putting the focus on
a child of the passed-in widget, and makes the focus-widget
property work for setting initial focus to (the child of) an
entry in a ui file.
After the header widget was introduced, focus would get
stuck in a loop between actions and tabs.
This could be seen in the notebook on page 3 of
widget-factory.
The third version of xdg-shell introduces support for explicit popup
repositioning. If available, make use of this to implement popup
repositioning.
Note that this does *NOT* include atomic parent-child state
synchronization. For that,
https://gitlab.freedesktop.org/wayland/wayland-protocols/issues/13 will
be needed.
This currently uses my own fork of wayland-protocols which adds meson
support, so that we can use it as a subproject. Eventually when
wayland-protocols' meson support lands upstream, we should change it to
point there.
Silence some meson warnings while at it to make CI happy.
This also bumps the glib requirement, since g_warning_once() is used.
- introduce two new colors: $focus_border_color for focused / outlined elements and $_coloured_focus_border_color for focused / outlined elements with a colored background color, like suggested/destructive buttons or selected elements
- set outline / focus color, offset and style accordingly for all widgets
- adapt entry focus color
Remove the plug/socket exception, and add exceptions for non-X11
windowing systems.
Additionally, speed up the file generation by avoiding string
concatenation in Python.
Language bindings—especially ones based on introspection—cannot deal
with custom type hiearchies. Luckily for us, GType has a derivable type
with low overhead: GTypeInstance.
By turning GskRenderNode into a GTypeInstance, and creating derived
types for each class of node, we can provide an introspectable API to
our non-C API consumers, with no functional change to the C API itself.