[gtk/wip/matthiasc/can-focus: 31/31] Mention focus changes in the migration guide
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/matthiasc/can-focus: 31/31] Mention focus changes in the migration guide
- Date: Thu, 9 Apr 2020 22:31:43 +0000 (UTC)
commit f16c8291907b523ce3a809623b0a67366c3e4039
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Apr 9 17:29:48 2020 -0400
Mention focus changes in the migration guide
docs/reference/gtk/migrating-3to4.xml | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
---
diff --git a/docs/reference/gtk/migrating-3to4.xml b/docs/reference/gtk/migrating-3to4.xml
index 634fcbe71d..570bdca0d7 100644
--- a/docs/reference/gtk/migrating-3to4.xml
+++ b/docs/reference/gtk/migrating-3to4.xml
@@ -470,6 +470,22 @@
</para>
</section>
+ <section>
+ <title>Focus handling changes</title>
+ <para>
+ The semantics of the #GtkWidget:can-focus property have changed.
+ In GTK 3, this property only meant that the widget itself would not
+ accept keyboard input, but its children still might (in the case of
+ containers). In GTK 4, if :can-focus is %FALSE, the focus cannot enter
+ the widget or any of its descendents, and the default value has changed
+ from %FALSE to %TRUE.
+ </para>
+ <para>
+ The recommended way to influence focus behavior of custom widgets
+ in GTK 4 is to override the focus() and grab_focus() vfuncs.
+ </para>
+ </section>
+
<section>
<title>Stop using GtkEventBox</title>
<para>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]