2
0
mirror of https://github.com/koreader/koreader synced 2024-11-04 12:00:25 +00:00
Commit Graph

9265 Commits

Author SHA1 Message Date
NiLuJe
2678d2c49b
Input: Unbreak evdev handling on Kobo single-touch devices (#9465)
* Kobo: Switch ST devices to a dedicated input handler

Instead of shoehorning a hack into the standard handler.

* Use setCurrentMtSlotChecked in handleTouchEvLegacy
2022-08-31 07:12:33 +02:00
zwim
615072c777
[AutoWarmth] optimisations and fixes to progressive warmth setting (#9442) 2022-08-24 13:32:16 +02:00
Alex Cabal
39b0ca2f36
Update Standard Ebooks OPDS URLs to new URL (#9371) 2022-08-19 19:20:34 +02:00
Hannes Krumbiegel
e7ec729adb
Update Czech-English Dictonary with inflections (#9370) 2022-08-19 17:43:50 +02:00
NiLuJe
2d5bde3ade
Input: Unbreak event handling on strict protocol B devices (#9445)
Regression since #9377
Fix #9444
2022-08-17 23:02:27 +02:00
Frans de Jonge
f8e888c832
[fix, SDL] Remove useless Device call from exit (#9443)
Fixes #9439.
2022-08-17 09:19:25 +02:00
NiLuJe
939a64438a
Input: Minor comment tweaks (#9441) 2022-08-17 00:25:33 +02:00
NiLuJe
841e67e018 Input: Make sure GestureDetector:feedEvent will actually consume all
slots

This ensures we won't leave *any* slot in an undefined state because
we skipped parsing 'em because what we consumed first yielded a
gesture.

(In particular, this could leave a few slots dangling in the "hold"
state in corner cases involving spider-hand finger tapping ;p).

Cleans up the slot state clearing in GestureDetector to only clear the
necessary slots (e.g., two-finger gestures now only clear their own two
slots; and holds only clear their own slot).
The fact that every slot will be consumed ensures that every slot will
naturally get their contact up handled, which wasn't the case before,
hence those crappy workarounds.

As far as timerfd callbacks are concerned, this *does* introduce the
possibility of deadline collisions, so, do reimplement minimal safety
checks to ensure we run (and free) the right timerfd callback.
2022-08-16 18:09:46 +02:00
NiLuJe
32ff263294 Input: Don't insert duplicate references to the event list
Some drivers can bundle the same slot multiple times in the same input
frame. We were only correctly coalescing *consecutive* slots, but some
drivers can do that in non-consecutive sequences (e.g., 1a -> 2a -> 1b
-> 2b), so, handle that, too.

Seen on neonode v2 grids.
2022-08-16 18:09:46 +02:00
NiLuJe
36d0bcc703 Input: Don't re-run the slot creation check on key sets
Make sure we always create the storage table when we add its reference
to the MTSlots list instead.

(The reasoning being we only add the reference once, and it's the first
thing we do, and we kinda need the storage to be created to get its
reference anyway; while we may set multiple keys per frame).
2022-08-16 18:09:46 +02:00
NiLuJe
ba43ac1833 Input: Actually fix the timer double-free
For realz, this time.

This reverts the original attempt, because it was gratuitous
overcomplexification that turns out to be completely unnecessary.

This also fixes a few subtle MT handling snafus on some devices.
2022-08-16 18:09:46 +02:00
NiLuJe
db2ba08617 Kobo: Handle the IR grid wakeup workaround on the Glo HD, too
Because the sysfs path is different, of course ;).
2022-08-16 18:09:46 +02:00
NiLuJe
3768aa0b56 GestureDetector: Clear *all* pending hold states on hold_release.
We'll only honor one (the last one) anyway, and we've already cleared
the timers, so the others are essentially lost and stuck in limbo.

(Repro: do a series of staggered holds on different words with different
fingers in a CRe document; the one that'll "take" is the last one,
but *every* slot will be stuck in a hold state, which can essentially
semi lock you into broken input until you manage to clear the right
slots by doing duplicate multi-slot holds again...).
2022-08-16 18:09:46 +02:00
NiLuJe
e3228abb19 ScreenSaver: On race-y platforms, only force a refresh on close if the
widget was actually closed *immediately*.

If it's delayed (by time, tap or gesture), leave it alone.

Fix #9285
2022-08-16 18:09:46 +02:00
NiLuJe
8e7dddd927 Input: Make sure we consume & clear the right timerfd callback
Multitouch gestures can create multiple timers on the same deadline, but
on different slots, so simply hoping that the head of the list would
match was somewhat optimistic... ;o).

Fix #9376

It's trickier in the !timerfd case, though,
so do the best we can there...
(It wouldn't crash, but it might fire the "wrong" callback).
2022-08-16 18:09:46 +02:00
yparitcher
c4a802c486 kindle: allow stopping the framework on 5.X
this reclaims a bunch of memory useful on low memory devices
2022-08-15 10:40:16 -04:00
poire-z
55c0fc6190
CanvasContext.hasEinkScreen(): avoid crash on Android (#9417)
It is used by CoverBrowser, in a subprocess, when extracting
metadata from PicDocuments, and crash on Android as calling
android methods is only allowed from the main thread.
2022-08-08 11:42:56 +02:00
zwim
d98fa04d13
[plugin] Fix crash in AutoWarmth (#9411)
Fixes the crash mentioned in https://github.com/koreader/koreader/issues/9409#issuecomment-1207484444?
2022-08-08 11:34:33 +02:00
poire-z
9cba1904ee
CRe, MuPDF, PicDocument: add support for WebP images (#9402)
Bump base, includes:
- thirdparty/luasec 1.2.0
- Bump NanoSVG: various small fixes
- Add thirdparty/libwebp and ffi/webp.lua wrapper
- MuPDF: add support for webp images
- bump crengine: add support for webp images
- thirdparty/harfbuzz 5.1.0
RenderImage:renderImageData(): render webp images
with ffi/webp.lua.
2022-08-03 23:19:31 +02:00
Martín Fernández
6f44a29b88
add tool to update F-Droid metadata based on weblate translations (#9090) 2022-08-03 16:18:47 +02:00
hius07
f67469bab4
Highlight: add note marker (#9395) 2022-08-03 09:51:57 -04:00
poire-z
d352579d06
BookMap: allow tap on ToC titles and outside page slots (#9400)
This helps jumping to page when ToC chapters are short
and the bookmap page rows narrow.
Also fix crash when invoking BookMap and PageBrowser
on a PicDocument (considered DocLess by Statistics).
2022-08-03 08:45:45 +02:00
Frans de Jonge
ad7cfa2c4b
Update translations for 2022.07 (#9394) 2022-07-31 09:06:15 +02:00
Martín Fernández
cee84cc65c
bump android-luajit-launcher (#9386)
Reverts iReader r6800
Fixes Note Air 2 definition
Adds Onyx Poke 4
Adds epd driver for the Sony DPT-RP1

Adds a new light driver for the Onyx Nova3 color. Thanks to @ilyats
2022-07-31 09:02:57 +02:00
weijiuqiao
30915546f0
vocabbuilder.koplugin: always show more button, add book filtering (#9393)
Always show more button instead of delete regardless of review count per #9383.
Adds book filtering per #9256 (from menu or by swiping up).
2022-07-31 09:02:09 +02:00
zwim
70642ba040
Bottom Menu: fix contrast has no units (#9392)
This should fix https://github.com/koreader/koreader/pull/9205#issuecomment-1200130686
2022-07-30 13:46:23 +02:00
zwim
ed34a3078e
AutoWarmth: fix stupid typo (#9382)
See https://github.com/koreader/koreader/pull/9337#issuecomment-1198008045
2022-07-28 14:57:02 +02:00
zwim
9d71333ade
AutoWarmth: add option to toggle/set frontlight on day/night (#9337) 2022-07-28 06:22:25 +02:00
hius07
460d42293a
PathChooser: add creating folder (#9354) 2022-07-27 12:02:37 -04:00
hius07
bff1e8deb7
InputText: fix 'number' hint (#9362)
When input_type == "number" convert the hint to "string" type.
Closes #9359.
2022-07-26 12:04:40 +02:00
ElimGarak1
bbc5652c1d
Add PocketBook Era (PB700) (#9365) 2022-07-23 15:29:09 +02:00
poire-z
5e2ed5ae2a
bump crengine: monospace and fallback fonts tweaks (#9343)
Includes:
- Text: fix possible overflow with "white-space: pre"
- Fonts: getFontFileNameAndFaceIndex(): return family type
- Fonts: account for _bias in Font hash
- epub.css, fb2.css: remove hardcoded monospace font names
- Fonts: allow scaling monospace fonts
- Fonts: allow adjusting fallback font sizes to x-height
- HTML parser: trust xml encoding before html charset

In our list of fonts, show a "M" indicator alongside
monospace fonts, and allow long-press to select the one
to be use for "font-family: monospace".
Add 2 options to Font settings, to scale monospace fonts
by a percentage, and to adjust fallback fonts to their
x-height.
2022-07-18 01:16:51 +02:00
Frans de Jonge
2462ed68ae
Bump base to revert sdcv so it'll work on Android (#9340)
Includes https://github.com/koreader/koreader-base/pull/1502

For more info: https://github.com/koreader/koreader-base/pull/1495
2022-07-16 09:04:00 +02:00
zwim
834dd9682a
AutoWarmth: update footer on menu actions (#9325) 2022-07-14 23:25:11 +02:00
zwim
d522ebe15d
AutoDim: fix timing problems with standby (#9315)
Fix #9303.
2022-07-14 20:08:46 +02:00
NiLuJe
f92dfeae21
Android: Leave the EV_MSC input handler alone. (#9335)
It's used to communicate state changes from Android to Lua, we really
really don't want to lose these ;).

Fix #9326
2022-07-14 17:05:57 +02:00
Stephane Albert
fc7f0bacf1
[PocketBook] fix: Crash loading file extensions (#9327)
In some versions of the /ebrmain/config/extensions.cfg file there is a
comment #ebrcfg. This will not match the regex and crashes koreader as
the table is empty.
Add a check to ensure the table is not empty while reading extensions
from the default file.
2022-07-14 11:46:25 +02:00
NiLuJe
e679b00d0a
Kobo: Autodetect the Elan input device on both i2c buses (#9322)
Hadn't noticed that the new Libra 2 has it on a different bus than the
Sage/Elipsa.

(Harmless because we kept the Sage & Elipsa hardcoded).

c.f., https://www.mobileread.com/forums/showpost.php?p=4238067&postcount=869,
thanks to @baskerville for the poke ;).
2022-07-12 20:45:00 +02:00
poire-z
b6f951e523
Screensaver: add option to require a gesture after resume (#9316) 2022-07-11 13:50:28 +02:00
zwim
22fe3933c3
[fix, SDL] Time: fix crash when scrolling in continuous mode (#9314)
Introduced with #8999.

Fixes #9311.
2022-07-09 22:47:10 +02:00
yparitcher
7366a031d6
kindle: track suspend time (#9307)
This is useful for the sysstat plugin not to have 00:00 for suspend time :)

Something similar should probably be done for the other canSuspend platforms.
2022-07-08 23:52:40 +02:00
Frans de Jonge
16ed0df7bc
Bump base for updated turbo patch (#9309)
It's been broken for at least a year.

<https://github.com/koreader/koreader-base/pull/1501>
2022-07-08 22:22:09 +02:00
poire-z
10a6ffd927 Style tweaks: fix typos and global tweak conflict
Minor logic fix: allow global_conflicts_with to be not only
a function, but also a string or a table, as documented.
2022-07-08 21:18:42 +02:00
poire-z
3fd550bd50 TouchMenu: don't allow swipe south to close menu
This is mostly needed because opening the menu with swipe
is actually done by handling a pan south event, and so the
final swipe event is another event, that is then handled
by TouchMenu, which would straight away close itself.
2022-07-08 21:18:42 +02:00
poire-z
eb883b8a94 TouchMenu: add swipe south to go back to parent menu 2022-07-07 00:32:07 +02:00
poire-z
937dfc682d Style tweaks: add In-page footnote font size and fix-up tweaks
Should help fixing many footnotes text size and layout issues
without having to hack a Book style tweak.
2022-07-07 00:32:07 +02:00
poire-z
c782d66c18 Style tweaks: add "Reset main text font size" 2022-07-07 00:32:07 +02:00
poire-z
6fb266cb71 Style tweaks: handle conflicting/redundant tweaks
Disable redundant or incompatible tweaks when enabling some.
This makes the menu more dynamic to show what's impacted,
save some re-renderings, and may avoid the user trying
combinations that would have no effect.
2022-07-07 00:32:07 +02:00
poire-z
94b76097aa Style tweaks: reorganize menu items
Make them a bit more logically grouped by topic.
Update a few priorities.
2022-07-07 00:32:07 +02:00
poire-z
49261c8272 bump crengine: style tweaks helpers, other fixes
Includes:
- CSS: add "-cr-hint: late" to increase selectors specificity
- CSS: add a few non-static "-cr-only-if:" values
- getStyledImageSize(): fix missing images when gRenderDPI=0
- Text: fix possible crash with floats and <br/>
- LVImg: fix crash on GIF images without color table

Also update thirdparty/fribidi to 1.0.12.
2022-07-07 00:32:07 +02:00