Commit Graph

66733 Commits

Author SHA1 Message Date
Emmanuele Bassi
03745a489c docs: Start outlining a11y authoring practices
We should have documentation for application developers and widget
authors, so they can deal with the new accessibility API.
2020-10-19 18:37:30 +01:00
Emmanuele Bassi
7c7dabae8c a11y: Rework accessible name/description computation
The ARIA spec determines the name and description of accessible elements
in a more complex way that simply mapping to a single property; instead,
it will chain up multiple definitions (if it finds them). For instance,
let's assume we have a button that saves a file selected from a file
selection widget; the widgets have the following attributes:

 - the file selection widget has a "label" attribute set to the
   selected file, e.g. "Final paper.pdf"
 - the "download" button has a "label" attribute set to the
   "Download" string
 - the "download" button has a "labelled-by" attribute set to
   reference the file selection widget

The ARIA spec says that the accessible name of the "Download" button
should be computed as "Download Final paper.pdf".

The algorithm defined in section 4.3 of the WAI-ARIA specification
applies to both accessible names (using the "label" and "labelled-by"
attributes), and to accessible descriptions (using the "description" and
"described-by" attributes).
2020-10-19 17:54:14 +01:00
Goran Vidović
94729b4880 Update Croatian translation
(cherry picked from commit fab2558747)
2020-10-19 16:37:36 +00:00
Matthias Clasen
2359510b1f Merge branch 'matthiasc/for-master' into 'master'
Various columnview fixes

Closes #3265, #3272, and #3276

See merge request GNOME/gtk!2717
2020-10-19 15:00:17 +00:00
Xavier Claessens
25a1c421b5 Merge branch 'msvc' into 'master'
gdkglcontext: Fix build with MSVC

Closes #3268

See merge request GNOME/gtk!2713
2020-10-19 13:46:54 +00:00
Matthias Clasen
ef308e5f17 Merge branch 'annotations_gtkaboutdialog' into 'master'
Add nullable return annotations in GtkAboutDialog

See merge request GNOME/gtk!2712
2020-10-19 13:46:32 +00:00
Sophie Herold
33f0809784 Add nullable return annotations in GtkAboutDialog 2020-10-19 13:46:32 +00:00
Matthias Clasen
81ee273e98 columnview: Make right-aligned content work
Make right-aligned content work in resized columns.
There is currently no way to make a title right-aligned,
but we can still make it work correctly. This is a follow
up to 7eb0ae39c5.

Fixes: #3276
2020-10-19 09:39:07 -04:00
Matthias Clasen
f3fe1812aa Adwaita: Put column separators on the left
When resizing columns, we clip a shrunk column
on the right, so the separator disappears in that
case unless we put it on the left side of the other
column.
2020-10-19 09:39:05 -04:00
Xavier Claessens
be8246a6cb gdkglcontext: Fix build with MSVC
GLDEBUGPROC callback is defined with APIENTRY which is a windows
specific calling convention. That macro expands to nothing when building
on other platforms.

Fixes: #3268.
2020-10-19 09:17:53 -04:00
Matthias Clasen
25d0fb4c76 columview: Make resize area a bit larger
This make column resizing feel less like a game
of hit-and-miss. Ultimatively, we should add an
alternative to this.
2020-10-19 08:31:37 -04:00
Matthias Clasen
98b66acbdd columview: Implement double-click to reset headers
Implement the same behavior as GtkTreeView:
double-click on the header boundary resets the
header to its automatic width.

Fixes: #3272
2020-10-19 08:31:37 -04:00
Matthias Clasen
1976df1e54 columnview: Make resize cursors reliable
Ensure that the column resize cursor stays in place
for the duration of the resize drag. This is a bit
annoying, since the implicit grab can end up on the
header of a different column from the one we are
resizing, so just set the cursor on all column headers.
2020-10-19 08:30:22 -04:00
Matthias Clasen
39baf4fff4 columnview: Fix more issues with column resizing
Make it so that for overlapping resize rectangles (with
very narrow columns), we prefer the narrow column, so you
can regrow a column after shrinking it all the way.

Related: #3274
2020-10-19 08:30:05 -04:00
Matthias Clasen
a88e5a5f4e columnview: Fix some issues with column resizing
Ensure that we place the resize rectangle at the visible
right edge of the column, not where the allocation ends
(we clip the header drawing, after all).

Related: #3274
2020-10-19 08:29:29 -04:00
Matthias Clasen
a39e519bed inspector: Clear overlays on unroot
In dispose(), we can't access the root anymore,
since we're already unrooted.

Fixes: #3265
2020-10-17 13:11:58 -04:00
Emmanuele Bassi
e9eb385f25 Merge branch 'patch-1' into 'master'
Add some missing nullable return annotations

See merge request GNOME/gtk!2707
2020-10-17 14:08:29 +00:00
Sophie Herold
cd0bef9390 Add some missing nullable return annotations 2020-10-17 15:32:36 +02:00
Matthias Clasen
5a79cc4d70 Merge branch 'wip/chergert/fix-macos-fps-calculation' into 'master'
macos: fix fps calculation for frame timings

See merge request GNOME/gtk!2705
2020-10-17 12:20:04 +00:00
Piotr Drąg
954855783a Update POTFILES.in 2020-10-17 11:11:24 +02:00
Christian Hergert
7ae8ed82c9 macos: fix fps calculation for frame timings
We need to mark the timings as complete after adding the
presentation time so that we have a valid FPS for the overlay
widget and/or fishbowl demo.
2020-10-15 21:04:51 -07:00
Matthias Clasen
1021e12121 3.99.3 2020-10-15 23:03:03 -04:00
Matthias Clasen
5833e8afa6 Merge branch 'win32.modal' into 'master'
GDK/Win32: Fix modal window handling and window stacking (for GTK4)

See merge request GNOME/gtk!2675
2020-10-16 03:01:38 +00:00
Matthias Clasen
34625142f4 docs: Expand opacity docs
Explain the situation with popovers and opacity.

Fixes: #3246
2020-10-15 22:39:01 -04:00
Matthias Clasen
6cbf1d0379 Merge branch 'a11y-action-fixes' into 'master'
A11y action fixes

See merge request GNOME/gtk!2703
2020-10-16 02:19:08 +00:00
Chun-wei Fan
2cc650ced2 gdk/Win32: Fix mouse pointer capture
Call SetCapture() explcitly for the (new) modal window so that we make the
modal window respond to mouse input, and also call SetCapture() to the parent
of the transient window that we are destroying so that mouse input capture is
returned to the parent window.

This attempts to fix the following:

*  Upon creating a new modal window, the new modal window does not receive
   pointer input unless one switches to another program and back

*  Upon closing a transient window, the parent window that activated the
   transient window does not receive pointer input unless one switches to
   another and back
2020-10-16 10:03:50 +08:00
Matthias Clasen
7165deb630 Merge branch 'fix-listbox-selection' into 'master'
Revert "listbox: Activate single-click rows if n_press >= 1"

Closes #3263

See merge request GNOME/gtk!2704
2020-10-16 02:03:16 +00:00
Руслан Ижбулатов
6a0c181886 GDK W32: Remove stacking functions
Stacking functions enforce non-native stacking behaviour that is
mostly unneeded, and doing so introduces bugs and complicates things.
2020-10-16 10:02:57 +08:00
Руслан Ижбулатов
89286af620 Revert "GDK W32: Use SWP_NOOWNERZORDER everywhere it can be applied"
This reverts commit fc2008f2.

Turns out, we *don't* have code to maintain Z-order. Restacking
code is not doint that, it just enforces a few weird Z-order-related
behaviours.
2020-10-16 10:01:46 +08:00
Chun-wei Fan
bc142b9c43 GDK/Win32: Fix modal window handling
Make sure that we get the state of the modal window properly, and send out the
corresponding notification signals.

This will ensure that we do not try to activate windows that should have become
inactivated due to it opening modal windows and render the program unresponsive
because we are not activating the correct window that is due to receive user
input.
2020-10-16 09:56:42 +08:00
Matthias Clasen
8eb6e876bd Revert "listbox: Activate single-click rows if n_press >= 1"
This reverts commit e669433cde.

This broke selection in several listbox examples.

Fixes: #3263
2020-10-15 21:46:58 -04:00
Matthias Clasen
ab61b7b9ae atspi: Properly filter out parent actions
We only want to show relevant, local actions for
widgets, but _gtk_widget_get_action_muxer() will
return the muxer of a parent widget (all the way
up to the toplevel), if the widget does not have
any actions of its own. To detect this situation,
compare what _gtk_widget_get_action_muxer() returns
for the parent widget, and act accordingly.
2020-10-15 21:32:11 -04:00
Matthias Clasen
3eae91255d atspi: Fix a thinko in action filtering
get_action_at_index() was trying hard to find out
which actions are valid, only to then return the
invalid ones anyway.
2020-10-15 21:31:58 -04:00
Matthias Clasen
5bbacc647c Merge branch 'a11y/atspi-action' into 'master'
A11y/atspi action

See merge request GNOME/gtk!2699
2020-10-16 00:13:23 +00:00
Emmanuele Bassi
cfb327974b a11y: Add atspi.Action for GtkPasswordEntry 2020-10-16 00:34:01 +01:00
Emmanuele Bassi
a83d3078c2 Allow toggling the password entry visibility programmatically
We are going to need a method for toggling the visibility from the
accessibility layer.
2020-10-16 00:34:01 +01:00
Emmanuele Bassi
f67345eb55 a11y: Add atspi.Action for GtkEntry
We need to handle the activation on the entry widget, as well as the
activation of the primary and secondary icons.
2020-10-16 00:34:01 +01:00
Emmanuele Bassi
c10bcf0a60 Add GtkEntry icon signals emitter
We need a (private) way to programmatically trigger the activation of
the entry's icons, so that we can call it from the accessibility layer.
2020-10-16 00:34:01 +01:00
Emmanuele Bassi
9ae08fc0f0 a11y: Add atspi.Action for GtkExpander 2020-10-16 00:34:01 +01:00
Emmanuele Bassi
5f1128899c a11y: De-duplicate some action code
The widgets with hard coded actions should share more code, instead of
copy-pasting it.
2020-10-16 00:34:01 +01:00
Emmanuele Bassi
e44f27a7ed a11y: Special case buttons and switches
These widgets have specific actions.
2020-10-16 00:34:01 +01:00
Emmanuele Bassi
374bd21340 Initial ATSPI Action implementation for widget
Use the actions from the GtkActionMuxer of each widget to populate the
list of actions available.
2020-10-16 00:34:01 +01:00
Matthias Clasen
916ef485d1 Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

Closes #3245

See merge request GNOME/gtk!2702
2020-10-15 21:00:44 +00:00
Matthias Clasen
92585b75fa Fix compiler warnings 2020-10-15 16:33:35 -04:00
Matthias Clasen
4bd2595421 actionmuxer: Make it possible to enumerate local actions
This will be useful for exposing actions via the
AT-SPI Actions interface.

Update all callers.
2020-10-15 16:32:55 -04:00
Matthias Clasen
aa4c0bf272 spinbutton: Hide the buttons from accessibility
The buttons here are not really buttons (the action
is not tied to the "clicked" signal), so triggering
the buttons via a11y does not have the expected effect.

And we expose the Value interface that ATs can use
to set the value.
2020-10-15 16:32:55 -04:00
Matthias Clasen
4e04c39609 emojicompletion: Avoid a memory overrun
Don't read beyond the beginning of the string.

Fixes: #3245
2020-10-15 16:32:55 -04:00
Matthias Clasen
0bd5a96d71 gtk-demo: Fix some issues with the multi view demo
The nested window was not modal, causing it to be
inoperable. And the nested views within were all
shrunk down to nothingness. Give them some width.

Fixes: #3257
2020-10-15 14:42:43 -04:00
Matthias Clasen
7d22616a0e Merge branch 'a11y-list-view-selection-fixes' into 'master'
atspi: Add fold markers

See merge request GNOME/gtk!2701
2020-10-15 17:36:47 +00:00
Matthias Clasen
8a14f019d0 atspi: Add fold markers
This makes it much easier to navigate in these
multi-implementation files.
2020-10-15 13:14:56 -04:00