Commit Graph

871 Commits

Author SHA1 Message Date
Dorota Czaplejewicz 2f4a652f53 Merge branch 'fixmods' into 'master'
virtual_keyboard: Fix desynced modifiers state

See merge request Librem5/squeekboard!362
2020-08-28 11:02:50 +00:00
Luís Fernando Stürmer da Rosa c87b61d065 Brazilian Portuguese Keyboard Layout. 2020-07-20 09:47:19 +00:00
Dorota Czaplejewicz 9512fd8436 virtual_keyboard: Fix desynced modifiers state
This ensures that keymap switches leave modifiers and virtual keys in a known state.
2020-07-15 18:08:59 +00:00
Dorota Czaplejewicz 4f72779681 size: Hardcode size to work around screen rotation
Phoc sends output information *after* changing keyboard surface size. Squeekboard adjusts size on surface events, but not on output in this revision, making it unaware of display size at the time of adjustment, resulting in bad adjustment.

This change hardcodes the proportions again to make it work at least on the Librem5.
2020-06-28 17:14:49 +00:00
Dorota Czaplejewicz 762e12431d Merge branch 'fix_gio_unix' into 'master'
build: Add missing gio-unix dependency

See merge request Librem5/squeekboard!356
2020-06-26 07:13:23 +00:00
Dorota Czaplejewicz ecfc45c2de build: Make compatible with Debian Bullseye
This commit is a bit bigger than it could have: Meson changes could have gone in separately from CI and Debian.

This commit looks more complicated than it should reasonably be. Alas, Cargo is a piece of work, and it doesn't let honest people just choose different versions of dependencies, leading to a cascade of misery. Several things were tried to curb the disaster:

- Cargo [feature] supports choosing dependencies, but doesn't support specifying dependency versions
- Cargo has a cfg() syntax in sections for choosing dependencies by build options, but it explicitly doesn't support selecting on features…
- Cargo allows choosing different dependencies based on features, so perhaps dependencies with different versions could live in stub crates pulled in as needed? Nope! If a dependency doesn't exist in the repo (and that's the point here), Cargo throws up its hands.

This means Cargo.toml needs to be generated based on the build type. More misery:

- we lose the simplicity of just doing `cargo.sh` for simple housekeeping like deps updates. HACKING.md was updated to reflect that. Perhaps that's inevitable - build options need to be like this.
- Some flaky adjustments needed in `cargo.sh` because of an additional argument that can be mistaken for an argument to the exec in `cargo run`.
- Specifying a custom `Cargo.toml` means Cargo can no longer find any tests, examples, benchmarks, or binaries, because it searches relative to the directory of `Cargo.toml`, which is now the build dir. Extra care needed to not forget about them now.

As soon as Cargo allows anything better for managing deps versions, the above should be undone in its favor.

Good side is that a couple bugs went away:

- build flags not always making it to Cargo
- arm64 builds were optional while they shouldn't
- test layouts in unit tests are loaded from an explicit directory now

The Bullseye versions of dependencies are canonical now, Buster considered legacy.
2020-06-24 15:51:21 +00:00
Dorota Czaplejewicz 3ba6aca99d build: Add missing gio-unix dependency 2020-06-13 08:27:33 +00:00
Guido Günther ec58442724 eek-gtk-keyboard: Trigger event feedback on button press
Use libfeedback to trigger feedback for the button press event.

Closes: #166
2020-06-04 12:13:58 +02:00
Ole Guldberg 0339d13ce4 Danish keyboard layout 2020-05-26 16:22:38 +02:00
Jordi Masip f473a47eb8 Removed unused dependency 'libcroco' 2020-05-24 16:31:43 +02:00
Vlad ef85823528 Fresh Russian layout 2020-05-20 17:59:22 +00:00
Dorota Czaplejewicz 54ac7511cd Merge branch 'scaling' into 'master'
Stop scaling

See merge request Librem5/squeekboard!339
2020-05-13 11:01:21 +00:00
Arnaud Ferraris 0bdb5f1f33 resources: include French keyboard layout 2020-04-23 13:07:33 +02:00
Dorota Czaplejewicz 3d1a641ca3 Merge remote-tracking branch 'upstream/master' into scaling 2020-03-12 10:51:30 +00:00
Dorota Czaplejewicz 0466a520f2 Merge branch 'predictoin_ui' into 'master'
Cleanups to make EekGtkKeyboard more standalone

See merge request Librem5/squeekboard!336
2020-03-12 10:46:14 +00:00
Dorota Czaplejewicz 9e8aca1cbf Merge branch 'unavailable' into 'master'
Crash less when outside resources are unavailable

See merge request Librem5/squeekboard!341
2020-03-11 10:55:05 +00:00
Dorota Czaplejewicz 8ff8e8ac48 Merge remote-tracking branch 'upstream/master' into scaling 2020-03-07 10:46:09 +00:00
Dorota Czaplejewicz abaaf04b87 Merge branch 'modifiers' into 'master'
Add simple modifiers support

See merge request Librem5/squeekboard!306
2020-03-07 10:32:33 +00:00
Dorota Czaplejewicz 3cd170acc3 sizing: Create a standalone UI shape manager
The manager is used for sizing the layer surface. It promises never to exceed half the output height.

The selection of the current layout is not being done here, leading to worse behaviour in 1:1 scaling.

In the future, it could be used for sizing the keyboard itself and the suggestion box, as well as decide which layout to use, because layouts should have some sizing hints.
2020-03-07 10:31:39 +00:00
Dorota Czaplejewicz 61e1ab5c5a layout: Split out choice to a struct on its own 2020-03-07 10:26:52 +00:00
&t 67cc4f11cf Fix minor comment typos 2020-03-04 04:53:53 +00:00
Dorota Czaplejewicz 8ac2b5a713 gsettings: Don't crash on switching when unavailable 2020-03-03 19:46:53 +00:00
Dorota Czaplejewicz 8bae8fe5bb dbus: Don't crash if can't make a connection 2020-03-03 19:25:49 +00:00
Dorota Czaplejewicz 92e9d994fe modifiers: Support Control and Alt
Control and Alt are special in that they aren't expected to switch levels, and so don't need to change what characters are output.

Use in layouts by adding `modifier: Control` or `modifier: Alt` in place of `text: "foo"`.

The latching of the modifier will force the keyboard to emit raw key presses and prevent it from outputting text.
2020-02-28 11:21:07 +00:00
Dorota Czaplejewicz 80919dbc42 Merge branch 'fix_ref' into 'master'
Variant: Use proper pointer conversion between C and Rust

See merge request Librem5/squeekboard!334
2020-02-28 11:08:46 +00:00
Dorota Czaplejewicz 46cbaf8e87 keyboard: Remove unused code 2020-02-23 12:15:19 +00:00
Dorota Czaplejewicz c0aee5de26 Variant: Use proper pointer conversion between C and Rust 2020-02-20 12:17:50 +00:00
Dorota Czaplejewicz cb802cfb50 layout: Improve press handling
Makes it more similar to release handling, removes some redundant checks.

This makes it easier to integrate modifiers in the future.
2020-02-19 15:40:39 +00:00
Dorota Czaplejewicz 85be855032 text input: Disable erasing
Erasing with zwp_text_input_v3 version 1 requires bytes, and bytes require get_surrounding_text. That, however, is optional. That's a mistake in protocol design.

Easiest to drop this until the mess is solved on the protocol side.
2020-02-12 10:56:07 +00:00
Dorota Czaplejewicz a57a78aa2e Merge branch 'center' into 'master'
Center views relative to layout space

See merge request Librem5/squeekboard!326
2020-02-09 20:34:31 +00:00
Sebastian Krzyszkowiak 41be2747d5 Merge branch 'fix' into 'master'
layout: Improve scoping of locked variable

See merge request Librem5/squeekboard!329
2020-02-05 13:19:19 +00:00
Dorota Czaplejewicz c766fae686 layout: Improve scoping of locked variable 2020-02-05 12:55:31 +00:00
Dorota Czaplejewicz aadcdbf276 Merge branch 'langs' into 'master'
Update translations & greek

See merge request Librem5/squeekboard!315
2020-02-05 11:05:42 +00:00
Dorota Czaplejewicz 10178d204b Merge remote-tracking branch 'upstream/master' into center 2020-02-05 10:32:07 +00:00
Sebastian Krzyszkowiak 0ac8c620fd Merge branch 'lock' into 'master'
Turn locking stateless

See merge request Librem5/squeekboard!322
2020-02-05 09:25:49 +00:00
Guido Gunther 80e83781bb Merge branch 'leaks' into 'master'
Allocation problems

See merge request Librem5/squeekboard!327
2020-02-05 09:24:46 +00:00
Dorota Czaplejewicz 37e1ed93a6 Merge branch 'text_input_enable' into 'master'
Submit and delete strings via text_input

See merge request Librem5/squeekboard!304
2020-02-03 15:06:25 +00:00
Dorota Czaplejewicz 1cbc21ad11 variant: Fix double-free
gio::Settings::set_value takes over ownership of the Variant sometimes, but in other cases it doesn't. To prevent this being a problem, the custom Variant is made of the type that will never have its ownership taken.

This is not necessarily consistent with what gtk-rs authors intended.

In practice, the ownership is shared by refcounting, and after the Rust reference is dropped, one taken by Settings survives.
2020-02-03 14:53:24 +00:00
Dorota Czaplejewicz 416bc6163e drawing: Generalized foreach_visible_button 2020-02-02 18:29:29 +00:00
Dorota Czaplejewicz 40b79f6209 layout: Center views relative to each other and the layout bounds 2020-02-02 18:07:28 +00:00
Dorota Czaplejewicz 782d80a007 row: Eliminate angle 2020-02-02 17:11:25 +00:00
Dorota Czaplejewicz 500c23beec locking: Lock keys statelessly
Locking is not determined by button state any more, but rather based on the view active at the moment. If pressing/locking a key results in the current view being active, the key is active. If locking a key results in the current view, the unlock view is activated.
2020-02-02 15:41:47 +00:00
Dorota Czaplejewicz 97d8dfe4cb locks: Draw based on current view 2020-02-02 14:45:33 +00:00
Sebastian Krzyszkowiak b9db00c00c layouts: Add Polish layouts 2020-01-30 21:19:13 +01:00
Dorota Czaplejewicz 7a588460bf setup: Connect ui to the state manager
This ensures that the layout type information is accessible to the state manager when new layout information arrive.

The should be thought of as a stopgap measure. A proper solution would be to separate the state properly, and probably turn layout information coming from random places into messages that some object (thread?) collects and displays.
2020-01-28 21:32:47 +00:00
Dorota Czaplejewicz 7f32c5cf23 greek: Rename to gr which is used by gnome settings 2020-01-28 19:17:47 +00:00
Dorota Czaplejewicz 2ffbdde758 layouts: Fix segfault on switching to wide 2020-01-28 16:42:58 +00:00
Dorota Czaplejewicz cd252634bd logging: Use in merged functions 2020-01-28 12:45:45 +00:00
Dorota Czaplejewicz de8aaa1a47 Merge remote-tracking branch 'upstream/master' into text_input_enable 2020-01-28 12:39:42 +00:00
Dorota Czaplejewicz ac360b610f Merge branch 'log' into 'master'
Unify logging

See merge request Librem5/squeekboard!308
2020-01-28 11:42:02 +00:00