Commit Graph

62023 Commits

Author SHA1 Message Date
Matthias Clasen
e8330c5eec Add gdk_event_matches
Move the elaborate key event matching code from
GtkShortcutTrigger to GdkEvent, which greatly reduces
the amount of keymap api use outside of GDK.
2020-04-05 23:37:13 -04:00
Matthias Clasen
1149502767 Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

See merge request GNOME/gtk!1630
2020-04-04 21:09:12 +00:00
Matthias Clasen
33928a52c3 gtk-demo: Fix a crash
Using the assistant demo repeatedly was crashing.
2020-04-04 15:35:18 -04:00
Matthias Clasen
b636df7784 Merge branch 'matthiasc/for-master' into 'master'
shortcuts: documentation fixes

See merge request GNOME/gtk!1628
2020-04-04 15:33:41 -04:00
Matthias Clasen
005739371c Merge branch 'matthiasc/for-master' into 'master'
shortcuts: documentation fixes

See merge request GNOME/gtk!1628
2020-04-04 16:31:43 +00:00
Matthias Clasen
ec854fc503 shortcuts: documentation fixes
Update symbol lists, and add examples for parsing triggers
and actions.
2020-04-04 12:22:43 -04:00
Piotr Drąg
e75e975a38 Update POTFILES.skip 2020-04-04 11:56:04 +02:00
Matthias Clasen
2bf81b51d9 Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

See merge request GNOME/gtk!1626
2020-04-04 05:00:22 +00:00
Matthias Clasen
22211f29fb colorbutton: Don't add a customize menu
The color swatch in the button does not need a
context menu. Turn it off.
2020-04-04 00:28:52 -04:00
Matthias Clasen
8991275fbd colorbutton: Fix focus
The colorbutton contains a button which contains a colorswatch.
We want the focus to go straight to the button, nowhere else,
so mark the swatch as !can-focus.

Adapt tests to match.
2020-04-04 00:28:45 -04:00
Matthias Clasen
f2d6a7b36a demos: Remove can-focus from ui files 2020-04-04 00:28:34 -04:00
Matthias Clasen
e43eb951d6 Merge branch 'scrollbar-a11y' into 'master'
Add GtkScrollbarAccessible

See merge request GNOME/gtk!1623
2020-04-04 04:03:40 +00:00
Matthias Clasen
5205fa0ff7 scrollbar: Be more defensive
Somehow the scrollbar accessible manages to call
gtk_scrollbar_get_adjustment when priv->range is NULL.
Survive taht.
2020-04-03 23:31:45 -04:00
Matthias Clasen
842af79e97 Merge branch 'shortcut-action-parse' into 'master'
Shortcut action parse

See merge request GNOME/gtk!1625
2020-04-04 03:12:10 +00:00
Matthias Clasen
6b292af6ac testsuite: Add tests for parsing shortcut actions 2020-04-03 22:42:00 -04:00
Matthias Clasen
1424dd9786 Add an api to parse shortcut actions
This is so we can test this code. While doing it
I also fixed the missing else that was caused it
not to work.
2020-04-03 22:41:15 -04:00
Matthias Clasen
339d3e41b0 Add GtkScrollbarAccessible
When GtkScrollbar stopped being a GtkRange,
GtkRangeAccessible stopped working for scrollbars.

Update a11y tests to match.
2020-04-03 15:20:27 -04:00
Carlos Garnacho
9a2f7338df Merge branch 'wip/carlosg/fix-surrounding-text-master' into 'master'
imwayland: Clamp the surrounding string end correctly

Closes #2565

See merge request GNOME/gtk!1621
2020-04-03 18:37:44 +00:00
Matthias Clasen
bdb127e54c Merge branch 'focus-test' into 'master'
Focus test

See merge request GNOME/gtk!1622
2020-04-03 18:23:27 +00:00
Carlos Garnacho
e5d23aaaaf imwayland: Clamp the surrounding string end correctly
In the paths where len > MAX_LEN and cursor/anchor are separated by
at least MAX_LEN from text edges, we were clamping the right end of
the surrounding string at MAX_LEN. Oops.

This end anchor may go as far as the string length, although just
up to len - MAX_LEN in real terms (due to the condition above that
caches cursor/anchor positions being near enough the text end).

Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2565

(cherry-picked from commit d7fb15c822)
2020-04-03 19:55:55 +02:00
Matthias Clasen
d662512c44 testsuite: Add a big focus chain testcase 2020-04-03 11:35:34 -04:00
Matthias Clasen
324af2f701 testsuite: Try harder to record a full focus chain
It is hard to avoid widgets with the same name in a
large ui file - try harder to record a full focus chain
before decide that we've wrapped, by including the widget
address in the comparison. Note that we don't include
the addresses in the generated output, since that would
make expected output vary from run to run.
2020-04-03 11:35:26 -04:00
Emmanuele Bassi
de481a7b5e Merge branch 'gir-fixes' into 'master'
Annotation fixes

See merge request GNOME/gtk!1616
2020-04-03 15:21:59 +00:00
Matthias Clasen
c8018e267a Merge branch 'move-gdkgrab-decl' into 'master'
gdk: Move GdkGrabStatus and GdkGrabOwnership decl.

See merge request GNOME/gtk!1615
2020-04-03 15:03:51 +00:00
Emmanuele Bassi
4e264a74be Annotation fixes
Match the arguments name in the declaration and the definition, and make
sure we have the proper transfer annotations.
2020-04-03 15:30:56 +01:00
Olivier Fourdan
4f49d83e43 gdk: Move GdkGrabStatus and GdkGrabOwnership decl.
With the removal of `gdk_seat_grab` we do not need to keep the
definitions of `GdkGrabStatus` and `GdkGrabOwnership` public.

Move those definitions to become internal only.
2020-04-03 15:23:01 +02:00
Timm Bäder
fb325afc79 shortcutcontroller: fix transfer full annotation 2020-04-03 08:03:32 +02:00
Timm Bäder
046190cb8a window: Don't leak toplevel layout 2020-04-03 07:37:54 +02:00
Matthias Clasen
53592497a4 Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

See merge request GNOME/gtk!1611
2020-04-03 01:07:14 +00:00
Matthias Clasen
cffa45d5ff wayland: Add a comment about keyboard state handling
Clarify a point that took me a few hours to fully track
down, so lets preserve what I found for the next poor
sould coming this way.
2020-04-02 17:43:14 -04:00
Matthias Clasen
14166b09b5 a11y tests: Update for focus state changes 2020-04-02 17:35:15 -04:00
Matthias Clasen
8a0035333a a11y: Set focus-related states properly
Entries and menubuttons are no longer focusable themselves,
they have focusable children. Since we don't have accessible
objects for those, transfer the focus-related state (focusable
and focused) from the children to the main accessible object.
2020-04-02 17:35:09 -04:00
Matthias Clasen
1f8e633fff window: tie focus to surface state changes
We don't get a focus-out on the event controller, when
the surface is losing keyboard focus, since we are not
moving our focus to some other widget, so we are never
unsetting the mnemonics-visible property. Do that in
response to surface state changes instead.
2020-04-02 17:21:01 -04:00
Matthias Clasen
6e6b4a851f Merge branch 'cherry-picked-wayland-keyboard-fix' into 'master'
gdk/wayland: Clear modifiers when we lose keyboard focus

Closes #2112

See merge request GNOME/gtk!1610
2020-04-02 20:43:29 +00:00
Jan Alexander Steffens (heftig)
7444b15d47 gdk/wayland: Clear modifiers when we lose keyboard focus
When we `Alt+Tab` away from a GTK application, it loses keyboard focus.
If we don't clear the modifiers, events from other devices that we
receive while unfocused will assume `Alt` is still pressed. This results
in e.g. Firefox navigating through the history instead of scrolling the
page when using the mouse wheel on it.

We don't get any information about modifiers while we are missing
keyboard focus, so assuming no modifiers are active is the best we can
do.

The shell sends us a modifier update immediately before we regain
keyboard focus, so the state shouldn't get out of sync.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2112
2020-04-02 16:18:18 -04:00
Matthias Clasen
dd625abfc1 Merge branch 'wip/smcv/libdir-independent-valgrind-suppressions' into 'master'
supp: Use a single suppressions file for lib, lib64 and multiarch

See merge request GNOME/gtk!1603
2020-04-02 14:46:45 +00:00
Matthias Clasen
b6f6df9662 Merge branch 'im-context-wayland-fixes' into 'master'
Im context wayland fixes

See merge request GNOME/gtk!1605
2020-04-02 13:29:32 +00:00
Matthias Clasen
aaa4e40a1f imcontexsimple: Move Compose file loading to class_init
This ensures that it is done only once.
2020-04-02 09:04:23 -04:00
Matthias Clasen
8ec254e2bb imcontextsimple: Simpify Compose file loading
We are not loading the Compose file for individual contexts,
it just gets added to a global list. So don't pass an im context
along. This will let us move the loading out of the initialization
of individual contexts, and only do it once.
2020-04-02 09:02:05 -04:00
Matthias Clasen
2a9911724f imcontextsimple: Load ~/.Compose unconditionally
There is nothing display-specific in the ~/.Compose file,
so we can just try to load it without looking at the
display we are on.
2020-04-02 09:02:05 -04:00
Matthias Clasen
a9b4ac3d59 imcontextsimple: Add a profiler mark for IO
We are loading a file here, thankfully in a thread, but
we do it every time an entry is created. Add a profiler
mark, to make this visible.
2020-04-02 09:02:05 -04:00
Simon McVittie
9df7f0197d supp: Use a single suppressions file for lib, lib64 and multiarch
In addition to the traditional library directory lib and the 64-bit
multilib directory lib64, this will cover Debian-style multiarch
(lib/x86_64-linux-gnu etc.), Arch Linux 32-bit (lib32), x32 and
various others.

Signed-off-by: Simon McVittie <smcv@debian.org>
2020-04-02 09:18:55 +01:00
Matthias Clasen
f169d23cdb Merge branch 'fix-menu-flicker' into 'master'
Fix crossing event generation

Closes #2536

See merge request GNOME/gtk!1601
2020-04-02 05:19:13 +00:00
Matthias Clasen
fcd36e59b1 Fix crossing event generation
We were not properly setting the new_descendent field
in Crossing structs for GTK_CROSSING_OUT events. This
was causing extraneous ::leave signals to be emitted,
and make model buttons in popover menus flicker when
hovered.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2536
2020-04-02 00:39:46 -04:00
Matthias Clasen
8196478b19 Merge branch 'drop-popover-demo' into 'master'
gtk-demo: Remove the popover demo

Closes #2429

See merge request GNOME/gtk!1600
2020-04-01 20:40:17 +00:00
Matthias Clasen
e31bbb41d2 gtk-demo: Remove the popover demo
It doesn't work anymore, since popovers now need
support in the parent, and we don't really need
a demo just for popovers. They are used everywhere
already.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2429
2020-04-01 15:45:13 -04:00
Emmanuele Bassi
9c948909ac Merge branch 'flow-box-typo' into 'master'
gtkflowbox: Fix a minor typo in the documentation

See merge request GNOME/gtk!1599
2020-04-01 13:45:19 +00:00
Philip Withnall
544b8d5a7f gtkflowbox: Fix a minor typo in the documentation
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-04-01 14:04:46 +01:00
Matthias Clasen
6ae5d9ac22 Merge branch 'matthiasc/for-master' into 'master'
keynav: Fix Shift-Tab

See merge request GNOME/gtk!1598
2020-04-01 05:04:02 +00:00
Matthias Clasen
63c6af8d13 Merge branch 'cursor-aspect-ratio' into 'master'
Add a cursor-aspect-ratio setting

See merge request GNOME/gtk!1597
2020-04-01 05:02:15 +00:00