-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
FocusManager: Fix focus_flags check in moveFocusTo, and deal with the fallout #12361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
As mentioned in #12359, this means that, on EDIT: In the PR's final state, this only applies to non-Touch hasDPad devices. So, err, RFC, I guess? It certainly looks funky on the emu, but it actually makes groking what the hell is happening with FocusManager much much much clearer, so I suspect it's a net win for actual UX on NT devices? |
f6e79a5 to
80d5f95
Compare
|
You can always gate it behind not isTouchDevice. |
|
So this appear to be working fine as far as I can see, except for a couple of cases (so far). Number 1 is More deceiving though is the dictionary one where the wrong element is highlighted, as you see in the pics below, one would thing edit: in my test of |
|
@Commodore64user: Thanks, fixed both of those ;). As for SortWidget, that requires #12359, too ;). |
I see. thanks! that hamburger menu could go the way of the dodo too, menu button opens it now so not really necessary on kindle. + if not (Device:hasSymKey() or Device:hasScreenKB()) then
table.insert(self.button_table.layout, 1, { self.dict_title.left_button });
+ end |
That would require more care because it affects the index at which the next insert needs to be. And the actual menu key on keyboards isn't bound to it anyway, so, eeeh, too much device-specific crap, pass. |
Roger that. |
|
and if
is a thought spoken out loud, I agree, maybe it should be |
The issue is that, unlike in TouchMenu, in Menu, it serves as the item separator, too; And the current thickness works quite well for that. 48289d9 attempts to swap it just for the focused item. |
|
okay, so in classic mode, the unfocus does not clear the first position correctly and it might be wise to use a similar trick for edit: and for some reason the loop (classic mode) now includes the header items (home and plus menu) twice. just press down a lot and you'll see |
|
sorry if I am pushing my luck now but, here is another one, twofold really first the obvious huge gap at the bottom, for reference this does not happen on kindle voyage (when one uses the page turn buttons to scroll down the list) and second the focus does not move along with the scroll, that is to say, if there are 30 results you still need to press the button many many times to even see where the focus is, for reference in that pic focus is still in the very first result in the list. |
Just re-read this and just wanted to say, yes it is. koreader/frontend/ui/widget/menu.lua Line 966 in cfd4225
|
Oh, it's because we bind F1 to |
|
For clarity, I mean KEY_MENU here, e.g., the thing right next to RCtrl ;). |
Yes, I don't think this should be surprising. ;-) It results in a very intuitive user experience. At the moment we're missing Shift+F10 support for keyboards without KEY_MENU though. |
894eb42 to
68ef72a
Compare
That applies to master, too, FWIW. |
And what a doozy that turned out to be.. -_-". We had two different TitleBar in there, because Menu insisted on creating one, but FileManager wanted to display its own, so there was an hilariously broken mix of hacks to display one and not the other (maybe, mostly), but both ended up seeping through to FocusManager... |
MVP goes to the default titlebar having a close button, because I noticed that there was a ghost widget in the cycle (conveniently at 1,1), and introspection revealed |
frontend/ui/widget/menu.lua
Outdated
| table.insert(self.layout, menu_item_layout_start_row, row) | ||
| menu_item_layout_start_row = menu_item_layout_start_row + 1 | ||
| end | ||
| -- Menu uses the right key to trigger the context menu: we can't use it to move focus in horizontal directions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For reference, this is no longer the case, unless you have hasFewKeys, all other devices have full dPad navigation functionality. But then again, kindle skips adding these to focus manager, so this mainly is for not kindle targets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took that to mean that Menu (the class) binds Menu (the key), so it cannot uses FocusManager's own Menu bind.
Which is true (on SDL, because FocusManager actually binds ContextMenu, which we discussed a few hours ago.. somewhere ;p).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, it's talking about the Right key, lol.
I clearly need more sleep.
this sounds remarkably similar to what happens with multiinputtext. There is a random ghost ether-like step in the cycle as seen here #9093 (comment) |
That... wasn't pretty ;). I'm woefully unfamiliar with those widgets, so if @poire-z has any better ideas on how to handle ButtonDialog's ScrollableContainer given that the only thing that's a FocusManager is the ButtonTable, feel free to look at my horrible hack in d550610 ;). |
That huge gap is actually a "feature":
Well, I have become unfamiliar with them :) |
|
But @poire-z why then the kindle voyage doesn't have those massive gaps as well when using the page turn button to scroll. There, it seems to accurately adjust the height just fine... Btw that is not OCD, unacceptable is what it is ;) |
|
Dunno, that might be for you to investigate why you end up with 18, while this should ensure we end up with 15, 10 or 6 :/: koreader/frontend/ui/widget/dictquicklookup.lua Lines 1560 to 1567 in 91c15d5
koreader/frontend/ui/widget/buttondialog.lua Lines 167 to 185 in 91c15d5
|
|
How fun, you can get it in the opposite end as well. to replicate: double press PgFwd and PgBack. Voyage on the right wiki search logs (if of any help)wiki seems to crash, (but not crash, close KOReader more like) when one closes the widget and locks the device shortly after after restarting the device, I keep getting that segmentation fault edit: great now is not just limited to locking the device |
AFAICT, it may or may not have to do with passing One the other hand, it may also have to do with something else, because I now do that for single-step focus moves and the pageturn buttons, and the single-step will re-snap and scroll-up instead of filling the bottom with blanks :D. In any case, I just realized that this broke navigating other stuff like SpinWidgets (with arrow keys but not tabs, lulz) for some reason, so, back to drawing board ^^. |
I'm wary of just changing the internal moveFocusTo default, as there are a few callers that *do* use it to respond to key events. So, let's just go with this for now.
approach It... horribly breaks, first, because on Esc, you lose focus, so key events aren't handled anymore; and, second if you then re-focus by clicking, you... still don't get key events handled for some reason? :D.
This reverts commit a5fb01d.
…tinput" This reverts commit 2ccf760. InputText loses focus when the hide the VK, so while we now *get* key events, we don't know where to send them, so we don't send them anywhere ;).
the input field. That worked in MultiInputDialogs thanks to its onSwitchFocus, but not InputDialog.
8e4b072 to
6b6fb60
Compare
NiLuJe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed all commit messages.
Reviewable status: all files reviewed, 7 unresolved discussions (waiting on @Commodore64user and @poire-z)
Commodore64user
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides my personal dislike for the scrolling widget (but that is a different matter altogether), this seems to work as intended. Nice work @NiLuJe
|
Just mentionning a refresh/repaint issue (related to InputDialog, and using Esc, so not totally unrelated to this PR :)), that @NiLuJe will probably have a easier time than me figuring it out : If you hit Cancel, all is fine, you get back to Reader with a nice page. |
(It's enough to just pass a mode, mode being set with a nil region means fs) The CRe highlight will likely extend past its boundaries, and we can't always rely on being closed in confunction with our VK (which would merge the two regions into a probably large enough one).
|
It's because when both the VK and InputDialog are dismissed at once, the two refresh regions get neatly coalesced into a full-screen refresh (as they both touch each other, the VK touches the bottom edge, and the ID touches the top edge) ;). Assuming there's the possibility for the dialog and VK to not actually touch each other and the top edge of the screen, there could be a similar result with the Cancel button. TL;DR: Easy fix, just request a full region on close in the cancel callback, InputDialog already goes looking for it on Back ;). (129ff72) |
NiLuJe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r26, 2 of 2 files at r27, all commit messages.
Reviewable status: all files reviewed, 7 unresolved discussions (waiting on @Commodore64user and @poire-z)
The drive-by fix for the original issue noticed late in koreader#12361 turned out to be a bit heavy-handed ;). Fix koreader#12444 Regression since koreader#12361
KOReader 2024.11 "Slang"  Some of you on Android may have had dictionary issues. That should be fixed now. Connecting to Wi-Fi should be more reliable on platforms where we manage it ourselves, most notably Kobo (koreader/lj-wpaclient#11). Color is now supported when reflowing (koreader#12085). This month's logo was contributed by @Sonnenfee We'd like to thank all contributors for their efforts. Some highlights since the previous release include: * Certain network features will now work in Flatpak (<flathub/rocks.koreader.KOReader#52>) @kii-chan-reloaded * 'Use left and right keys for page turning' option added (koreader#12174) @Commodore64user * Text editor: enhancement (koreader#12176) @hius07 (1) Speed up adding/deleting chars (by avoiding a call of expensive splitToChars), noticeable on big files. (2) Indicate select mode: wider cursor. * Annotations: more fixes (koreader#12181) @hius07 (1) Allows annotations with equal datetime fields. (2) Allows page bookmarks with equal page numbers. * kopt: color support (koreader#12085) @benoit-pierre * bump base (updated build system) & fix macOS CI (koreader#12187) @benoit-pierre * AltStatusBar/Footer: add the read timer value (koreader#12002) @zwim * bump translations (koreader#12193) @pazos * CRE call cache: don't wrap setViewMode (koreader#12194) @poire-z * bump crengine: various fixes and optimizations (koreader#12200) @poire-z * Add author option for alt status bar (koreader/crengine#575) (koreader#12197) @trash-pandy * Page turns: invert vertical tap zones (koreader#12195) @hius07 * Annotations: pageno honors reference pages and hidden flows (koreader#12214) @hius07 * ToggleSwitch: fix long-press (koreader#12215) @hius07 * SDL: Return true in NetworkMgr:isConnected on !hasWifiToggle platforms (koreader#12217) @NiLuJe * Kobo: Refactor various aspects of the Kaleido/MTK support (koreader#12221) @NiLuJe * ReaderAnnotation: fix doesMatch func (koreader#12231) @hius07 * bump base (koreader#12241) @benoit-pierre * NetworkMgr: Attempt to handle wpa_supplicant rescans better (koreader#12236) @NiLuJe * miscellaneous build system changes (koreader#12242) @benoit-pierre * make: handle old build data directory (koreader#12259) @benoit-pierre * ReaderFooter: improve (koreader#12243) @hius07 * Annotations: fix exporting (koreader#12261) @hius07 * make: install missing `cr3.css`… (koreader#12262) @benoit-pierre * [fix] NetworkMgr: apply HTTP proxy setting on startup (koreader#12260) @Frenzie * Kobo: Track frontlight state more accurately on suspend/resume (koreader#12256) @NiLuJe * Make W-Fi scan more reliable (koreader#12265, koreader/lj-wpaclient#11) @NiLuJe * ReaderAnnotation: fix doesMatch func 2 (koreader#12270) @hius07 * make: fix android update sdcv (koreader#12275) @benoit-pierre * [plugin] Reader footer: check if header resp. footer are available (koreader#12264) @zwim * ReadHistory: On remove, trust the index from FileManagerHistory if possible (koreader#12253) @NiLuJe * ReaderUI: add `seamless` argument to switchDocument (koreader#12290) @ziz57 * Fix early unhighlight after Add to vocab builder (koreader#12288) @poire-z * [CoverBrowser.MosaicMenu] Increase the thickness of the mosaic’s focus underline (koreader#12189) @Commodore64user * doc: update building documentation (koreader#12295) @benoit-pierre * NetworkMgr: fix debug trace (koreader#12297) @benoit-pierre * Panel zoom: Properly handle `renderPage()` not rendering the whole page (koreader#12296) @fbriere * PowerD: Keep track of frontlight state change by interactive callers for suspend/resume purposes (koreader#12283) @NiLuJe * InputDialog and MultiInputDialog: improve enter and edit callback handling, and implement addWidget (koreader#12289) @ziz57 * ReaderSearch: "All text" improve (koreader#12287) @hius07 * Show/Hide Virtual keyboard and more keyboard shortcuts (koreader#12162) @Commodore64user * bump base; mostly thirdparty bumps (koreader#12311) @benoit-pierre * Document: Do not cache panel-zoom tiles to disk and fix their caching and rendering (koreader#12303) @NiLuJe * Disable the legacy ReaderRotation module (koreader#12309) @NiLuJe * bump luajit (koreader#12317) @benoit-pierre * [AutoWarmth] Delay front light actions after resume (koreader#12315) @zwim * Allow numbers in measure text: fixes a crash in table of contents when debugging on (koreader#12310) @zwim * ReaderFooter: Add page-turn item (koreader#12249) @Commodore64user * luajit launcher: out of tree build + don't rebuild luajit (koreader#12285) @benoit-pierre * BookInfo: rating, review (koreader#12313) @hius07 * fix missing android APK asset (koreader#12333) @benoit-pierre * ImageWidget: Don't attempt to pan if we haven't rendered the bb yet (koreader#12331) @NiLuJe * OTM: Unbreak koreader#11999 (koreader#12337) @NiLuJe * Kobo: Refactor suspend in order to be able to catch input events sent during the 2s window of ntx madness (koreader#12330) @NiLuJe * [Menu] Remove title bar buttons from layout on hasSymKey or hasScreenKB (koreader#12328) @Commodore64user * [doc] Build: update Android instructions to openjdk-17-jdk (koreader#12345) @Frenzie * Support 'Ctrl' shortcuts on hasKeyboard (koreader#12347) @Commodore64user * Annotations: fix page numbers (koreader#12324) @hius07 * Bug Fix: DPad conflict on Kindle Keyboard (koreader#12341) @Commodore64user * Nit: Make some cache keys prettier (koreader#12354) @NiLuJe * Dispatcher: minor wording fixes (koreader#12356) @hius07 * kodev rework (koreader#12338) @benoit-pierre * czmq & libzmq: update to 4.2.1 & 4.3.5 respectively (koreader#12350) @benoit-pierre * [TextViewer] Add hamburger menu to FocusManager and Menu key (koreader#12365) @Commodore64user * ci: fix test / coverage (koreader#12367) @benoit-pierre * A couple of tiny fixes (koreader#12359) @NiLuJe * android: tweak update rule (koreader#12370) @benoit-pierre * doc: update Android build instructions (koreader#12368) @benoit-pierre * Display menu preview of italic-only fonts (koreader#12351) @charrarr * ReaderStatus, Book status widget: cleanup (koreader#12343) @hius07 * ci/macos: fix homebrew packages install (koreader#12382) @benoit-pierre * Fix terminal broken cursor and backspace (koreader#12375) @zwim * Screensaver: add option to rotate to fit screen (koreader#12366) @charrarr * Minor keyboard corrections (koreader#12372) @Commodore64user * Touch menu: always go up to correct parent page (koreader#12378) @hius07 * Collections: fix context menu (koreader#12383) @hius07 * PDF: no "Contrast set to" notification on opening (koreader#12391) @hius07 * Closing Bookmark details dialog with X should also refresh list entry (koreader#12390) @fbriere * Add numerical key_codes to event_map on kindle 3 (koreader#12358) @Commodore64user * FocusManager: Fix focus_flags check in moveFocusTo, and deal with the fallout (koreader#12361) @NiLuJe * Various notification, text editor and footnote popup minor fixes (koreader#12406) @poire-z * Bug: Account for local reading order direction adjustments. (koreader#12388) @Commodore64user * android: add custom `adb logcat` formatter (koreader#12385) @benoit-pierre * kodev: improve `kodev prompt` (koreader#12408) @benoit-pierre * kodev: fix `./kodev run android…` (koreader#12407) @benoit-pierre * Readerfont: Current font on top in menu; New fonts from current session on top in font test doc (koreader#12410) @jonnyl2 * Fix a couple of potentially spurious footer refreshes (koreader#12422) @NiLuJe * FileManager: Handle the FlushSettings event (koreader#12425) @NiLuJe * PageBrowser: fix drawing of thicker thumbnail frame on tap (koreader#12432) @poire-z * FileManagerSetDefaults: Handle strings that we default to nil (koreader#12433) @NiLuJe * Input: Ignore ABS_X, ABS_Y & ABS_PRESSURE for snow_protocol (koreader#12427) @NiLuJe * Add color highlight menu (koreader#11044) @smasher816 * Exporter: choose highlight styles to be exported (koreader#12431) @hius07 * ReaderView: Don't crash on pre-koreader#11044 highlights without a color field (koreader#12438) @NiLuJe * Terminal fixes (koreader#12369) @ziz57 * Dispatcher/DeviceListener: Temporarily turn on Accelerometer/GSensor for 5 sec (koreader#12419) @jonnyl2 * fix bug preventing export to joplin; (koreader#12446) @bitterlox * bump base: blitbuffer, android build, crengine (koreader#12451) @poire-z * InputText: Unbreak onTapTextBox on an already in-focus field (koreader#12449) @NiLuJe * Update el_popup.lua (koreader#12463) @ichnilatis-gr * [Dispatcher] add [missing] conditions to dispatcher items (koreader#12453) @Commodore64user * ReaderView: Fix a couple of edge-cases in onReaderFooterVisibilityChange (koreader#12466) @NiLuJe * misc: Move cleanupSelectedText to util (koreader#12477) @NiLuJe * ReaderHighlight: Fix an old typo in the OCR help string (koreader#12479) @NiLuJe * Highlights popup dialog: add "Color" and "Details" buttons (koreader#12461) @hius07 * ButtonDialogTitle: remove (koreader#12394) @hius07 * [Dispatcher] new events for selecting links (koreader#12474) @Commodore64user * Doc: Update quickstartguide on kindle non touch (koreader#12426) @Commodore64user * [NT] Call GotoViewRel for page up/down on useDPadAsActionKeys devices (koreader#12495) @cccslater * bump base (koreader#12503) @benoit-pierre * Defaults: Deprecate DKOPTREADER_CONFIG_DOC_LANGS_TEXT (koreader#12504) @NiLuJe * ReaderAnnotation: skip old highlights with invalid xpointers (koreader#12494) @hius07 * Cloud Sync: handles potentially incompatible backup and incoming dbs (koreader#12470) @weijiuqiao * VocabBuilder.koplugin: Better handling word context (koreader#12469) @weijiuqiao * Write highlights into PDF: revisited (koreader#12509) @hius07 * SyncService: Only require online connectivity when using Dropbox (koreader#12520) @NiLuJe * Chore: Don't cache static data tables (ui/elements, ui/data, kb layouts & co) (koreader#12519) @NiLuJe * Fix page gap inconsistencies between doc open & config change (koreader#12507) @NiLuJe * Kindle: Restore hall effect sensor state on startup (koreader#12521) @NiLuJe * VocabBuilder.koplugin: save dict headword as entry (koreader#12530) @weijiuqiao * Add PocketBook Verse Pro Color (PB634K3) (koreader#12476) @ElimGarak1 * Onyx Boox Go 10.3 support (koreader#12533) @hugleo * Statistics: fix null terminated strings, add toggle stats (koreader#12547) @hius07 * input: drop use of `ffi/input` (koreader#12486) @benoit-pierre * ci/circle: fix tests parallelism (koreader#12551) @benoit-pierre * input: fix kobo init (koreader#12553) @benoit-pierre * [ReaderFooter] update status bar in real time when inverting page turning (koreader#12424) @Commodore64user * input: fix pocketbook init (koreader#12555) @benoit-pierre * use new `ffi.loadlib` helper (koreader#12545) @benoit-pierre * input: fix loading of `fbink_input` library (koreader#12560) @benoit-pierre * Fix typos in quickstart (koreader#12566) @cheywood * File search: improve (koreader#12549) @hius07 * [DictQuickLookup] shortcuts for editing searches (koreader#12539) @Commodore64user * Profiles: auto-execute on events (koreader#12564) @hius07 * Exporter: export to book folder, register to Dispatcher (koreader#12569) @hius07 * sdl: use our compiled version for the AppImage (koreader#12575) @benoit-pierre * Add kobov4 & kobov5 targets (koreader#12568) @NiLuJe * android: switch to monolibtic mode (koreader#12576) @benoit-pierre * android: fix apkanalyzer location (koreader#12563) @benoit-pierre * Disabled rotation map for Android devices where "hw media keys follow gravity" (koreader#12557) @jkl16 * Quickstart guide kindle illustrations (koreader#12577) @Commodore64user * [plugin] Exporter: fix typo (koreader#12592) @Frenzie * Dispatcher: values' range consistent with bottom menu (koreader#12580) @hius07 * metadata translations for fdroid/flathub (koreader#12581) @pazos * ProgressWidget: fix misalignment (koreader#12526) @wbstx * Add wifi support to Cervantes Touch Light devices (koreader#12148) @jsanpe * ReaderTypeset: fix margins info (koreader#12609) @hius07 * DocSettingsTweak: apply to books with status (koreader#12606) @hius07 * Menu widget: rotation handler (koreader#12573) @hius07 * Profiles: add "on rotation" auto-execute event (koreader#12612) @hius07 * ReaderHighlight: adjustable "Edit highlight" dialog position (koreader#12599) @hius07 * KOSync/Kobo: Explicitly kill Wi-Fi on suspend (koreader#12616) @NiLuJe * Kobo: Minor simplification after koreader#12616 (koreader#12629) @NiLuJe * bump luajit-launcher (koreader#12630) @benoit-pierre * Terminal: Minor cleanups (koreader#12631) @NiLuJe * Menu widget: draw focus on focused item (koreader#12583) @hius07 * Cloud storage: fix sorting non-English filenames (koreader#12644) @hius07 * Text editor: show current line number (koreader#12632) @hius07 * InputText: fix Terminal plugin input (koreader#12652) @hius07 * ReaderFont test: Error correction -- new fonts were not rendering in own font (koreader#12646) @jonnyl2 * ReaderHighlight: fix color for extended highlight in pdf (koreader#12654) @hius07 * Kindle Scribe: fix elseif for orientation code (koreader#12663) @mergen3107 * Menu: Fix fallout from koreader#12583 on hasDPad devices (koreader#12657) @NiLuJe * Misc: Some more FocusManager fallout (koreader#12667) @NiLuJe * plugin messages (koreader#12636) @pazos * And deprecation to autofrontlight (koreader#12619) @pazos * Add deprecation for unmaintained targets (koreader#12620) @pazos * Profiles: more auto-exec triggers (koreader#12651) @hius07 * PatchManagement: prettify menu (koreader#12668) @hius07 * Fix KOReader spelling in the code (koreader#12670) @mergen3107 * Update Building.md - meson install from backports (koreader#12680) @mergen3107 * OTA: Make the final ConfirmBox undismissable (koreader#12676) @NiLuJe * Text editor: rotate (koreader#12658) @hius07 * Profiles: more auto-exec triggers 2 (koreader#12691) @hius07 * Add authentication request and cookies management for news (koreader#12496) @bateast * calibre: always use custom fast parser (koreader#12714, koreader#12715) @pazos * Add Nextcloud Notes to exporter plugin (koreader#12301) @kotnik * [plugin] Wallabag: remove empty file when download fails (koreader#12723) @fenuks * [plugin] Wallabag: separate option to delete ‘on hold’ articles (koreader#12722) @fenuks * kopt: fix OCR segmentation mode (koreader#12726) @benoit-pierre * bump base (koreader#12727) @benoit-pierre Most notably dropbear: update to 2024.85 (koreader/koreader-base#1964) * bump android-luajit-launcher (koreader#12734) @pazos * ci/circle: manually cap build jobs (koreader#12751) @benoit-pierre * Adjust Minimum Font Size in Terminal Emulator (koreader#12752) @pphszx * ReaderHighlight: Highlight menu, change 'Delete' to Trash can icon (koreader#12758) @jonnyl2 * @trash-pandy made their first contribution in koreader#12197 * @fbriere made their first contribution in koreader#12296 * @charrarr made their first contribution in koreader#12351 * @smasher816 made their first contribution in koreader#11044 * @bitterlox made their first contribution in koreader#12446 * @cccslater made their first contribution in koreader#12495 * @cheywood made their first contribution in koreader#12566 * @jkl16 made their first contribution in koreader#12557 * @wbstx made their first contribution in koreader#12526 * @jsanpe made their first contribution in koreader#12148 * @fenuks made their first contribution in koreader#12723 * @pphszx made their first contribution in koreader#12752 **Full Changelog**: koreader/koreader@v2024.07...v2024.11 — [closed milestone issues](https://github.com/koreader/koreader/milestone/74?closed=1) --- **Installation instructions**: [Android](https://github.com/koreader/koreader/wiki/Installation-on-Android-devices) • [Cervantes](https://github.com/koreader/koreader/wiki/Installation-on-BQ-devices) • [ChromeOS](https://github.com/koreader/koreader/wiki/Installation-on-Chromebook-devices) • [Kindle](https://github.com/koreader/koreader/wiki/Installation-on-Kindle-devices) • [Kobo](https://github.com/koreader/koreader/wiki/Installation-on-Kobo-devices) • [PocketBook](https://github.com/koreader/koreader/wiki/Installation-on-PocketBook-devices) • [ReMarkable](https://github.com/koreader/koreader/wiki/Installation-on-ReMarkable) • [Desktop Linux](https://github.com/koreader/koreader/wiki/Installation-on-desktop-linux) • [MacOS](https://github.com/koreader/koreader/wiki/Installation-on-MacOS)













focus_flagscheck inmoveFocusTo(0 is truthy in Lua, can't do AND checks like in C ;).)outer_title_barhack, and simply take acustom_title_barpointer to an actual TitleBar instance instead._recalculateDimen(all the non-FM cases were including an old and now unused padding value,self.header_padding, leading to more blank space at the bottom than necessary, and, worse, leading to different item heights between FM views, possibly leading to unnecessary thumbnail scaling !)[⋮]buttons.update(i.e., we useNOT_FOCUSnow that it works as intended).Menukey bind does the exact same thing as the hamburger icon.mergeTitleBarIntoLayouttwice inupdateItems. We already call Menu's, which handles it. (Prevents the title bar from being added twice to the FocusManager layout).Unfocuschecks inmoveFocusToto ensure we always unfocus something (if unfocusing was requested), even if we have to blast the whole widget tree to do so. This ensures callers that mangle self.layout can expect things to work after calling it regardless of how borked the current focus is.focus_flagstorefocusWidget, so that it can be forwarded to the internalmoveFocusTocall.focus_flagscheck fix at the root of this PR ;).toggleKeyboardbutton (shown w/add_nav_bar) is at play. And doubly so when we'refullscreen, as hiding the VK implies resizing the widget.hasDPadonFocushandler.onFocusabout the initial/programmatically-sent Focus event.header_paddingfield mentioned earlier in the FM/FC fixes.FOCUS_ONLY_ON_NTin the explicitmoveFocusTocall inupdatePageInfo, so as to keep the current behavior of not showing the visual feedback of this focus on Touch devices.moveFocusTocalls are gated behind thehasDPaddevcap (previously, that was only the case forupdatePageInfo, but notmergeTitleBarIntoLayout(which is called byupdateItems).refocusWidgethandles this case sanely.fullscreen).c.f., #12359 (comment)
This change is