Commit Graph

62072 Commits

Author SHA1 Message Date
Emmanuele Bassi
2f0016eb08 Rename gdkx11keys.h
The header is now private, so it should follow the same naming scheme
for private GDK-X11 headers.
2020-04-07 18:12:58 +01:00
Emmanuele Bassi
f87291cac2 Hide GdkX11Keymap's GType function
It's not a public object.
2020-04-07 18:10:01 +01:00
Emmanuele Bassi
37c3ba2645 Do not parse all GDK-X11 source files
We don't need all of them, only the ones that contain public API. This
allows us to reduce the chance of a stray symbol getting incorrectly
added to the introspection data.
2020-04-07 18:06:08 +01:00
Matthias Clasen
2486f46c0b Merge branch 'keymap-rework-2' into 'master'
Keymap rework 2

See merge request GNOME/gtk!1635
2020-04-06 20:56:06 +00:00
Matthias Clasen
c03b7e4d45 reftests: Comment out a test that fails only in ci
Fixing such only-in-ci failures is just too hard,
unfortunately.
2020-04-06 16:32:03 -04:00
Matthias Clasen
e7a8a4eb06 Update migration guide
Rewrite the sections about keymaps and menus, and add
hints about modifiers.
2020-04-06 16:32:03 -04:00
Matthias Clasen
70fbf8dbb6 accelgroup: Small documentation updates
Mention GtkShortcutTrigger, and remove references
to <Release>.
2020-04-06 16:32:03 -04:00
Matthias Clasen
93a1b3027d Reshuffle keymap docs
Since GdkKeymap api is on longer public, move relevant
documentation to the long description.
2020-04-06 16:32:03 -04:00
Matthias Clasen
1de7719e34 Drop gtk_accelerator_set_default_mod_mask
Our new approach to modifiers works with a fixed set,
there is really no need to customize the modifier
masks if the backends are all supposed to deliver
the same modifiers.
2020-04-06 16:32:03 -04:00
Matthias Clasen
f7f103a322 gdk: Remove gdk_keymap_get_modifier_mask
This function is no longer public and no longer used.
2020-04-06 16:32:03 -04:00
Matthias Clasen
14be8f6b73 Remove uses of modifier intents in gdkevents.c
This removes the use of the context menu and shift group
intents in gdkevents.c. If it turns out to be important,
we need to introduce vfuncs for gdk_event_triggers_context_menu
and gdk_event_matches.
2020-04-06 16:32:03 -04:00
Matthias Clasen
99a344f791 display: Remove gdk_display_get_modifier_mask
This is not used anymore.
2020-04-06 16:32:03 -04:00
Matthias Clasen
3419d9c04f gtk: Drop gtk_widget_get_modifier_mask
This is not used anymore.
2020-04-06 16:32:03 -04:00
Matthias Clasen
c297d45b8a gtk: Stop using modifier intents
Reviewing the existing settings, the only backend with
some differences in the modifier intent settings is OS X,
and we would rather have that implemented by interpreting
the existing modifiers in the appropriate way.

                X11      Wayland  Win32    OS X

primary         ctrl     ctrl     ctrl     mod2
mnemonic        alt      alt      alt      alt
context menu    -        -        -        ctrl
extend sel      shift    shift    shift    shift
modify sel      ctrl     ctrl     ctrl     mod2
no text         alt|ctrl alt|ctrl alt|ctrl mod2|ctrl
shift group     varies   -        -        alt

GTK now uses the following modifiers:

primary         ctrl
mnemonic        alt
extend sel      shift
modify sel      ctrl
no text         alt|ctrl

The context menu and shift group intents were not used
in GTK at all.

Update tests to no longer expect <Primary> to roundtrip
through the accelerator parsing and formatting code.
2020-04-06 16:32:03 -04:00
Matthias Clasen
dce8d251c6 keymap: Remove virtual modifier mapping functions
These are not used anymore.

Drop the vfuncs and their implementations in the
broadway, x11, wayland and win32 backends as well.
2020-04-06 16:32:03 -04:00
Matthias Clasen
89ad7893ad gdk: Make GdkKeymap a private api
We have replacement apis in GdkDevice and GdkDisplay.
2020-04-06 16:32:03 -04:00
Matthias Clasen
da6faf321c Merge branch 'misc-meson-fixes' into 'master'
Reduce useless relinking on configure and fix check for buildtype arguments

See merge request GNOME/gtk!1614
2020-04-06 20:22:01 +00:00
Justin van Steijn
c8b791a763 Update Dutch translation 2020-04-06 19:40:22 +00:00
Matthias Clasen
0eb728aa51 imcontextsimple: Disable some win32-only code
This code needs to be redone differently, since keymaps are no
longer going to be exposed. There should really not be this much
ifdef-ed backend-specific code here anyway. Or any, really.
2020-04-06 15:33:49 -04:00
Matthias Clasen
3300686bef gdk: Clean up GdkModifierType
Remove MOD2..MOD5. Backends are expected to just set
the named modifiers.
2020-04-06 15:13:54 -04:00
Matthias Clasen
0a96a483c6 gdk: Redo key events
Add all of the keyboard translation results in the key event,
so we can translate the keyboard state at the time the event
is created, and avoid doing state translation at match time.

We actually need to carry two sets of translation results,
since we ignore CapsLock when matching accelerators, in
gdk_event_matches().

At the same time, drop the scancode field - it is only ever
set on win32, and is basically unused in GTK.

Update all callers.
2020-04-06 15:13:54 -04:00
Matthias Clasen
5071367794 gtk: Remove handling of virtual modifiers
These are going away. We expect to just have
named modifiers in modifier masks now, so we
longer juggle 'real' and 'virtual' modifiers.
2020-04-06 15:13:54 -04:00
Matthias Clasen
5ce05a8fd0 events: Stop doing elaborate virtual modifier handling
These are going away in the GdkModifierType cleanup.
Just compare the modifiers we got.
2020-04-06 15:13:54 -04:00
Matthias Clasen
be2a0971c2 broadway: Stop using MOD2..MOD5
These are going away in the GdkModifierType cleanup.
2020-04-06 15:13:53 -04:00
Matthias Clasen
25e9a54902 win32: Stop using MODx modifiers
The win32 backend is using GDK_MOD2_MASK for AltGr,
so define GDK_MOD2_MASK locally to keep this working,
but remove any mention of GDK_MOD3_MASK,...,GDK_MOD5_MASK.
2020-04-06 15:13:00 -04:00
Yuri Chornoivan
df1c6b6b68 Update Ukrainian translation 2020-04-06 15:46:52 +00:00
Yuri Chornoivan
00c791fcf9 Update Ukrainian translation 2020-04-06 14:06:17 +00:00
Matthias Clasen
a5e73820da Merge branch 'fno-common' into 'master'
Add a missing extern, to fix building with -fno-common

See merge request GNOME/gtk!1631
2020-04-06 12:47:55 +00:00
Matthias Clasen
7fa103717d wayland: Stop setting MOD2..MOD5
These are going away in the GdkModifierType cleanup.
2020-04-06 01:40:49 -04:00
Matthias Clasen
f8646b9733 gdk: Remove reserved bit from GdkModifierType
This really has no purpose and obscures the header.
2020-04-06 01:40:49 -04:00
Matthias Clasen
d110fddbce gtk: Stop using GDK_MODx_MASK
These are never used in practice, and we never want to
see them in the UI, so stop supporting them. This is
in preparation for cleaning up GdkModifierType.
2020-04-06 01:40:49 -04:00
Matthias Clasen
b02db72e17 Rename GDK_MOD1_MASK to GDK_ALT_MASK
We've hardcoded Mod1 = Alt for a long time, there is
no need to keep the confusing naming around anymore.
2020-04-06 01:40:49 -04:00
Matthias Clasen
e8f30c836d tests: Stop using gtk_accelerator_set_default_mod_mask
This is not doing anything useful here.
2020-04-06 01:40:49 -04:00
Matthias Clasen
6eaadba008 testsuite: Stop using keymap apis 2020-04-06 01:40:49 -04:00
Matthias Clasen
4495bacfd1 gtk: Use display apis for keymap mapping
This removes the last uses of GdkKeymap from GTK.
2020-04-06 01:40:49 -04:00
Matthias Clasen
234a21905c gtk: Stop using keymap apis
Stop using most keymap apis in GTK. Only a few calls
related to virtual modifiers are left.
2020-04-06 01:40:49 -04:00
Matthias Clasen
13213c710f x11: Notify new device properties 2020-04-06 01:40:49 -04:00
Matthias Clasen
e165267924 wayland: Notify new device properties 2020-04-06 01:40:49 -04:00
Matthias Clasen
00b25d5594 Move keymap mapping functions to GdkDisplay
We want to stop exposing GdkKeymap, so this
functionality needs a new home.
2020-04-06 01:40:40 -04:00
Matthias Clasen
31fb5c287a Move GdkKeymapKey to gdktypes.h
We are going to use this type in a different header.
2020-04-05 23:43:41 -04:00
Matthias Clasen
416ec580dc gdk: Move modifier mask api to GdkDisplay
GdkKeymap is on the way out.
2020-04-05 23:43:41 -04:00
Matthias Clasen
ee14be8ac1 gdk: Add keymap properties to GdkDevice
GdkKeymap is on the way out.
2020-04-05 23:43:41 -04:00
Matthias Clasen
f27470aaf4 passwordentry: Show caps lock warning more
Show the caps lock warning regardless of whether we
have the peek icon or not.
2020-04-05 23:43:41 -04:00
Matthias Clasen
90eda2b17c Drop some no longer used code 2020-04-05 23:43:41 -04:00
Matthias Clasen
68d43c8e5c cell renderer accel: Use gdk_event_get_match 2020-04-05 23:43:41 -04:00
Matthias Clasen
c9aef3fc4d Add gdk_event_get_match
This is a counterpart to gdk_event_matches() that can
be used to obtain a shortcut matching an event.
2020-04-05 23:37:13 -04:00
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
Martin Storsjö
25a53276e0 Add a missing extern, to fix building with -fno-common
With C compilers defaulting to -fcommon, this isn't an issue, but
upcoming compilers (GCC 10 and Clang 11) will default to -fno-common,
ending up with duplicate definitions of these variables.
2020-04-05 00:43:16 +03: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