Commit Graph

89 Commits

Author SHA1 Message Date
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
55f7a0d0dc Make sure large key does not overlap with the small key. 2011-08-15 18:13:55 +09:00
7919cc191e Capture motion-notify event. 2011-08-15 18:10:57 +09:00
db0c5088b7 Apply active style to the key under the large key. 2011-08-15 17:49:02 +09:00
f4e33a4ad4 Make sure that large key bounds do not overflow the widget allocation. 2011-08-15 16:45:11 +09:00
57a072746e Release dragged key when unmap. 2011-08-15 12:16:44 +09:00
2d2aea009e Rewrite 15c0a9da using cairo_pattern_set_extend. 2011-08-12 16:25:56 +09:00
15c0a9dadf Blank background around a large key when key release. 2011-08-12 15:00:46 +09:00
163e005561 Simplify "blank background" code. 2011-03-08 06:04:41 +09:00
d8e691d3f5 Optimize redraw on key release. 2011-03-08 05:53:00 +09:00
37c2579253 Merge theme handling code (WIP). 2011-03-04 18:52:25 +09:00
23ab2a343f Fix coding style. 2011-03-04 14:28:20 +09:00
8b632356e9 Fix memleaks. 2011-03-03 15:05:59 +09:00
18f8e5b98b Draw key with icon if EekSymbol has "icon-name" property. 2011-03-01 11:57:07 +09:00
4440a2f1ac Release dragged key when gtk keyboard is disposed. 2011-02-25 18:17:05 +09:00
12cc310e38 Make sure that a key is not pressed when sending new "pressed" event of it. 2011-02-21 16:13:19 +09:00