Commit Graph

104 Commits

Author SHA1 Message Date
fc683de434 keyboard: Pass the current view instead of level 2019-08-18 13:20:43 +00:00
d858005a68 Merge branch 'improve-drag-handling' into 'master'
Release each pressed key instead of the current pressed key

See merge request Librem5/squeekboard!125
2019-08-13 12:01:57 +00:00
91d7cc1118 Release each pressed key instead of the current pressed key 2019-08-10 16:11:53 +00:00
cc3f2315a7 Use keyboards as views
Got rid of modifiers in the process. Still buggy: dragging over keys.
2019-08-08 19:56:36 +00:00
f371b14e89 levelkeyboard: Use a layer for managing keyboard views 2019-08-08 19:26:21 +00:00
53b89aae45 symbol: Remove remains 2019-08-08 19:18:29 +00:00
b76e43679e level: Remove level from elements 2019-08-08 19:18:29 +00:00
077ca8fad2 level: Make keyboard the only source of level data 2019-08-08 19:18:29 +00:00
d6b59d16fd Merge branch 'keyboard-signal' into 'master'
gtk-keyboard: Remove unused signal connections

See merge request Librem5/squeekboard!120
2019-08-05 14:27:09 +00:00
537ded4b58 Merge branch 'release-keys-when-focus-is-lost' into 'master'
Release pressed keys when dragging outside the keyboard

See merge request Librem5/squeekboard!119
2019-08-04 11:00:20 +00:00
8298a1412b gtk-keyboard: Remove unused signal connections 2019-08-04 10:23:57 +00:00
0057c80b2e Release pressed keys when dragging outside the keyboard
If no keys are under the touch position when dragging then release all
existing pressed keys. This fixes the problem where the last pressed key
causes events to be sent while the touch position moves outside the
keyboard extent.
2019-08-02 15:31:18 +00:00
64680664e3 Use a CSS provider and style context instead of the old theme support 2019-08-02 17:04:16 +02:00
016c1086e6 Center the keyboard horizontally
Also simplify individual key rendering to make the rendering model more
coherent.
2019-08-02 12:48:35 +02:00
8f1de46381 Simplify layout and rendering
Remove pre-scaling of the bounds for the keyboard and its contents.
Calculate the scale factor based on the allocation and the desired width
and height of each keyboard, using the lower value of the horizontal and
vertical scale factors.
Apply scaling in the renderer and prepare to perform centering there.
2019-07-30 21:48:36 +00:00
d49e0eaa1b Center the keyboard in landscape orientation 2019-07-26 22:27:56 +00:00
a5875402ef Move EekGtkRenderer features into EekRenderer 2019-07-18 15:42:27 +02:00
dbc8cc14bc Generate config.h
This allows us to remove a lot of #ifdef's. Either we want to use
a config.h or we don't. Since we'll want it for e.g. optional gsound
support later on let's have it.
2019-07-17 19:50:53 +02:00
e5e2e08ff4 Merge branch 'fewer-redraws' into 'master'
keyboard: Schedule widget redraw instead of gdk_window_invalidate_rect

See merge request Librem5/squeekboard!75
2019-07-15 22:57:12 +00:00
c7c410210b Merge branch 'scale' into 'master'
Honor widget scale  factor

See merge request Librem5/squeekboard!56
2019-07-15 22:27:34 +00:00
94c9442de1 keyboard: Drop now unused clip_bounds_to_dirty_rectangle() 2019-07-15 17:42:32 +02:00
8c044d0852 keyboard: Schedule widget redraw instead of gdk_window_invalidate_rect
The later would invaliate the drawn area again and again in a ::draw()
handler. This caused infinite redraws when e.g. a key was locked.  To
reproduce break e.g. on `eek_gtk_keyboard_real_draw()` and see how it is
invoked again and again.
2019-07-15 17:42:32 +02:00
1f0cc0a5f3 keyboard: Don't leak on set_keyboard()
Unref and disconnect signals before setting a new keyboard.
2019-07-15 14:12:10 +02:00
5693ce3df7 keyboard: Simplify signal disconnect
We're only keeping the signal ids around for disconnect but that only
happens in dispose so it's o.k.to just disconnect all keyboard signals
we listen to.
2019-07-15 14:12:10 +02:00
d0fa444a0e Honor the outputs scale factor 2019-07-15 13:13:34 +02:00
de39256377 Remove pop-ups for pressed keys 2019-07-11 23:39:33 +00:00
094aa872ce Cleanups: fix deprecated g_type_class_add_private()
- use G_DECLARE_ and G_DEFINE_ macros
- move all data into ClassNamePrivate
- use _get_instance_private()

This should not introduce any functional changes or breakage.

Skipped two classes (EekKeyboard and EekboardContextService) for now in
order not to break the build.

These two classes are used in some very funky WIP code that tries to
circumvent encapsulation.

(Funky code is in eekboard/key-emitter.c and eekboard/eekboard-context-service.c)
2019-07-08 08:44:05 +02:00
0e8715b4ff Improve key rendering and eliminate two deprecation warnings
- Replace two calls to deprecated gdk_cairo_create()

- Alleviate asymmetry between rendering pressed and released keys
  by consistenly clipping the same area up front to avoid
  artefacts

- make sure pressed and released keys are shown immediately by
  calling gdk_window_invalidate_rect()

- improve consistency between render_(pressed|locked|released)_key

- improve code flow
2019-07-07 11:34:24 +02:00
050fd6f3ba Touch support
Single stream of touch events.
2019-06-29 12:56:04 +00:00
9e5629d1e0 Enable Wayland's virtual-keyboard protocol
This commit includes a little restructuring necessary for keeping wayland objects properly.
It doesn't fix broken modifier functionality yet.
2019-06-25 18:12:15 +00:00
5a6386dd24 Fixed rendering deprecation warnings 2019-06-22 13:13:55 +00:00
0809db9e32 Remove some rendering code with no effect and warnings 2019-06-22 12:56:33 +00:00
15a3315854 Fix dragging across the keyboard 2019-06-22 12:34:10 +00:00
82d1f256b2 Remove released and cancelled key events 2019-06-22 12:23:04 +00:00
e7ba2a0eb0 Got rid of signals in the pressed path 2019-06-19 17:00:30 +00:00
eff0449b3a Redrawing key after press is happening directly 2019-06-19 16:51:57 +00:00
260ab42b9e Forward press timestamps 2019-06-19 15:56:19 +00:00
a3d745edd0 Moved key pressing from context to keyboard 2019-06-19 15:27:29 +00:00
40a92fe730 Ignoring section.key-pressed 2019-06-19 14:11:23 +00:00
5cc407986b Ignore multi-clicks and non-left-buttons 2019-04-06 18:35:06 +00:00
4a346211b8 Show tooltips. 2012-04-23 16:43:06 +09:00
ee0505c100 Add keyboard selection dialog to preferences. 2012-03-28 12:54:22 +09:00
1943749cb6 Drop GTK2 support. 2012-03-23 18:07:05 +09:00
f442733b33 Fix some mistakes.
* remove useless g_obect_{set,get}_property call.
* free GError on error.
2012-03-16 18:15:50 +09:00
668b974dd7 Improve border rendering without theme. 2011-10-14 10:04:16 +09:00
f72e9f5293 Copy pressed_keys list before sending released/cancelled signal (RHBZ#737396). 2011-09-12 11:06:52 +09:00
a6bde78168 Highlight locked modifiers. 2011-08-22 14:44:46 +09:00
6a7b256676 Remove unnecessary null initialization. 2011-08-18 11:31:01 +09:00
7af6bf13ed Support feedback sounds. 2011-08-18 11:18:27 +09:00
b6beeedc26 Improve key-repeat behavior. 2011-08-16 16:30:13 +09:00