ui: Remove explicit can-focus

Glade misleads us into thinking we need these, but the
property is somewhat confusing in GTK3. In general we don't
want `can-focus` to be true for containers, as that will
break keynav for the children. For non-containers, the
defaults are appropriate.

Instead of manually setting `can-focus`, we should just
use the default values. GTK has sane defaults.

Fixes https://gitlab.gnome.org/GNOME/calls/-/issues/366
This commit is contained in:
Christopher Davis
2021-11-30 11:52:36 -08:00
parent 3e22ef8c74
commit 50847dfe43
9 changed files with 0 additions and 59 deletions

View File

@@ -3,7 +3,6 @@
<interface>
<requires lib="gtk+" version="3.20"/>
<template class="CallsCallWindow" parent="GtkApplicationWindow">
<property name="can_focus">False</property>
<!-- <property name="decorated">False</property> -->
<property name="hide_titlebar_when_maximized">True</property>
<property name="show_menubar">False</property>
@@ -12,30 +11,24 @@
<child>
<object class="GtkOverlay">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child type="overlay">
<object class="CallsInAppNotification" id="in_app_notification">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
</child>
<child>
<object class="GtkStack" id="main_stack">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">never</property>
<child>
<object class="GtkViewport">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkFlowBox" id="call_selector">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="homogeneous">True</property>
<property name="column_spacing">12</property>
@@ -54,7 +47,6 @@
<child>
<object class="GtkStack" id="call_stack">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="expand">True</property>
</object>
<packing>
@@ -68,12 +60,10 @@
<child type="titlebar">
<object class="GtkStack" id="header_bar_stack">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="visible_child_name" bind-source="main_stack" bind-property="visible_child_name" bind-flags="bidirectional|sync-create"/>
<child>
<object class="GtkHeaderBar">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="name">calls</property>
@@ -82,18 +72,15 @@
<child>
<object class="GtkHeaderBar">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkButton" id="show_calls">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="no_show_all">True</property>
<signal name="clicked" handler="show_calls_clicked_cb" swapped="no"/>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">system-switch-user-symbolic</property>
</object>
</child>