The check against fitting inside the Layout was removed: as an optimization it is unneeded, as the actual search must be optimized to be quick. In addition, the view bounds don't correspond to anything physical as long as negative offsets are allowed.
Each Button has a KeyState, which may be shared with other buttons. The list of pressed and locked buttons is used as a list of keys, causing a search for the button in the current view.
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.
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.
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.
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.
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.
- 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)
- 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