Commit Graph

1089 Commits

Author SHA1 Message Date
Dorota Czaplejewicz
4aee4915d9 Merge branch 'generate-xkb-files' into 'master'
Generate XKB keymaps from XML instead of using pre-made ones

See merge request Librem5/squeekboard!90
2019-07-30 17:38:06 +00:00
David Boddie
5eeaa1c693 Remove unused geometry file 2019-07-30 19:28:16 +02:00
David Boddie
9b2fcf89e8 Use a test-oriented init call 2019-07-30 17:20:15 +02:00
David Boddie
e801a68f0d Add comments to explain what empty labels do 2019-07-30 16:50:23 +02:00
Dorota Czaplejewicz
ffc5628637 readme: Change the clone URL 2019-07-30 13:08:12 +00:00
Dorota Czaplejewicz
306aa89d06 Merge branch 'content_type' into 'master'
Finish up imservice state

See merge request Librem5/squeekboard!93
2019-07-30 11:44:19 +00:00
Dorota Czaplejewicz
236415cde4 Merge branch 'add-landscape-orientation' into 'master'
Add landscape orientation

See merge request Librem5/squeekboard!99
2019-07-30 11:19:41 +00:00
David Boddie
d49e0eaa1b Center the keyboard in landscape orientation 2019-07-26 22:27:56 +00:00
David Boddie
107399a531 Don't set the geometry of the window in normal use
Setting the geometry prevents the widget from getting the correct
allocation and prevents us from positioning it correctly in
landscape mode.
2019-07-26 22:26:02 +00:00
David Boddie
99a7786dc3 Remove declaration of unused variable 2019-07-26 12:01:04 +02:00
Guido Gunther
d8f48cc48b Merge branch 'use-button-size-for-icons' into 'master'
Use the standard button size for icons

See merge request Librem5/squeekboard!98
2019-07-26 08:04:53 +00:00
David Boddie
2f0beb6d3a Add a simple test of keymap generation 2019-07-25 22:25:30 +02:00
David Boddie
3ab3627ffe Remove unused keymaps 2019-07-25 22:25:30 +02:00
David Boddie
70895999c2 Generate XKB keymaps from XML instead of using pre-made ones 2019-07-25 22:25:29 +02:00
David Boddie
ce311e1bf1 Use the standard button size for icons 2019-07-25 20:14:32 +00:00
David Boddie
e9cf572a3c Only recreate the widget when the keyboard layout changes
Avoid creating a widget before there is a window to put it in.
2019-07-25 18:07:29 +00:00
David Boddie
943b2ad9f3 Merge branch 'xkb_resource_oob_read' into 'master'
Fix out of bounds memory read in get_keymap_from_resource.

See merge request Librem5/squeekboard!97
2019-07-25 13:20:35 +00:00
Piotr Tworek
f86bbb09f8 Fix out of bounds memory read in get_keymap_from_resource.
The function reads resource content into a buffer whose size matches the
size of the file contents. This buffer does not have an extra byte that
would 0 terminate this string. This is by itself is not a problem.
Unfortunately the buffer is passed to g_utf8_make_valid function with
size argument specified as -1 which means the buffer is supposed to be
NULL terminated. The end result is g_utf8_make_valid will read at least
1 byte past "contents" buffer size.

Fix this by specifying buffer size when calling g_utf8_make_valid.
2019-07-24 17:08:19 +02:00
David Boddie
1246776328 Create the keyboard surface every time it is needed
Icons are still blurry the first time the keyboard is shown after
rotation.
2019-07-24 14:04:28 +00:00
David Boddie
ea15f69e73 Render the keyboard to a subsurface of the widget 2019-07-24 13:12:57 +00:00
David Boddie
2e22bb5431 Merge branch 'fix-squeekboard-resources' into 'master'
Ensure that resources are built with the application

See merge request Librem5/squeekboard!95
2019-07-23 23:25:33 +00:00
David Boddie
a9a6e1d2b5 Ensure that resources are built with the application 2019-07-24 01:22:58 +02:00
Dorota Czaplejewicz
7e939c36cc imservice: Call show/hide directly 2019-07-23 20:26:42 +00:00
Dorota Czaplejewicz
c5d2d76ab1 imservice: Handle unavailable message 2019-07-23 20:26:42 +00:00
Dorota Czaplejewicz
622ba6e38a imservice: Handle text change cause
Nothing is being done with this information yet
2019-07-23 20:26:42 +00:00
Dorota Czaplejewicz
fad06348a7 imservice: Make imservice opaque
The structure is defined in Rust, with the intention of evaluating using Rust in this area. It's specifically not defined as repr(C), in order to encourage that. Without the repr, it was unsafe to have its members exposed in C.
2019-07-23 20:26:42 +00:00
Dorota Czaplejewicz
a6ee303123 imservice: Handle content type in Rust
This adds `bitflags.rs` from the bitflags crate.
Due to not wanting to introduce Cargo as the dependency manager yet, it's slightly modified to compile as a naked module.
2019-07-23 20:25:13 +00:00
David Boddie
4b66add65f Merge branch 'ci' into 'master'
Run tests in ci

See merge request Librem5/squeekboard!94
2019-07-23 11:29:34 +00:00
Guido Günther
79dce7c4c3 gitlab-ci: Run tests under xvfb
We create widgets so need a display.
2019-07-23 10:20:07 +02:00
Guido Günther
aff71e0e33 debian: Add test run dependencies
We need xvfb to run the tests since this involves creating GTK
widgets.
2019-07-23 10:20:02 +02:00
David Boddie
9b10f56ba6 Keep the build directory as an artifact 2019-07-23 10:18:44 +02:00
David Boddie
2391947b34 Update CI configuration to enable tests 2019-07-23 10:18:44 +02:00
David Boddie
e903150971 Enable tests, fixing the existing ones to use the current API
This also involved building a static library for the application for
tests to link to. The main application executable also links to it.
2019-07-23 10:18:44 +02:00
David Boddie
7495ec9bbb Merge branch 'remove-includes' into 'master'
Remove unnecessary X11 includes

See merge request Librem5/squeekboard!91
2019-07-20 22:00:58 +00:00
David Boddie
e25d5a84b2 Remove unnecessary X11 includes 2019-07-20 23:57:38 +02:00
David Boddie
88ade4df1b Merge branch 'add-keyboards-for-purposes' into 'master'
Add keyboards for purposes

See merge request Librem5/squeekboard!89
2019-07-20 21:44:30 +00:00
David Boddie
00c3903672 Respond to the input purpose, showing a numeric keypad if requested 2019-07-20 17:33:55 +02:00
David Boddie
c801b17ba0 Add initial files to test specialized keyboard support 2019-07-20 17:33:50 +02:00
David Boddie
9ec8d62f3f Merge branch 'respond-to-input-source-changes' into 'master'
Respond to input source changes

See merge request Librem5/squeekboard!88
2019-07-20 15:31:40 +00:00
David Boddie
b1edcfcb1b Tidy up a merge 2019-07-20 17:26:00 +02:00
David Boddie
54b0f59935 Always create a new widget for a keyboard and update it if already visible 2019-07-20 17:25:55 +02:00
David Boddie
531b09f296 Merge branch 'adapt-keyboard-for-different-levels' into 'master'
Omit keys without labels on the current level, update key definitions

See merge request Librem5/squeekboard!87
2019-07-20 15:24:09 +00:00
David Boddie
e5b6d66d60 Omit keys without labels on the current level, update key definitions 2019-07-20 17:17:37 +02:00
David Boddie
a045810af6 Merge branch 'add-built-in-keymaps' into 'master'
Add built in keymaps

See merge request Librem5/squeekboard!78
2019-07-20 14:42:51 +00:00
David Boddie
d68a8fef9a Merge branch 'resize-icons' into 'master'
Declare the correct size for icons

See merge request Librem5/squeekboard!86
2019-07-20 14:41:29 +00:00
David Boddie
9162d4291f Declare the correct size for icons 2019-07-20 14:39:47 +00:00
David Boddie
93d7699aa7 Merge branch 'make-layout-more-flexible' into 'master'
Make layout handling more flexible

See merge request Librem5/squeekboard!85
2019-07-20 14:31:26 +00:00
David Boddie
6eb63f6a4c Refactor layout code, rescale and reformat when changing level 2019-07-19 17:35:49 +02:00
David Boddie
f6d4ca0387 Place keys after symbols have been read, skipping blank keys 2019-07-19 17:35:49 +02:00
David Boddie
7b41466a77 Start to refactor keyboard section layout 2019-07-19 17:35:49 +02:00