Skip to content
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

[UX] VirtualKeyPopup: close on hold release #4891

Merged
merged 3 commits into from
Apr 10, 2019

Conversation

Frenzie
Copy link
Member

@Frenzie Frenzie commented Apr 10, 2019

As suggested by @poire-z.

@Frenzie Frenzie added the UX label Apr 10, 2019
@Frenzie Frenzie added this to the 2019.05 milestone Apr 10, 2019
@Frenzie Frenzie merged commit fd50dc3 into koreader:master Apr 10, 2019
@Frenzie Frenzie deleted the close-on-holdrelease branch April 10, 2019 15:05
@poire-z
Copy link
Contributor

poire-z commented Apr 10, 2019

There seems to be a refresh issue with current master, when pan'releas'ing:

image

With flash keyboard enabled and hitting where the s is hidden:

image

image

It's ok when tapping, and tapping outside to dismiss the popup.

@Frenzie
Copy link
Member Author

Frenzie commented Apr 10, 2019

That's on your Kobo?

@poire-z
Copy link
Contributor

poire-z commented Apr 10, 2019

No, on the emulator, after just a git pull.

@Frenzie
Copy link
Member Author

Frenzie commented Apr 10, 2019

Lightbulb thought: do you have keyboard flash disabled?

@Frenzie
Copy link
Member Author

Frenzie commented Apr 10, 2019

And if so, does the setDirty from 4c4efca do the trick?

function VirtualKeyPopup:onClose()
    local dimen = self.dimen
    UIManager:close(self)
    UIManager:setDirty(self, function()
        return "partial", dimen
    end)
    return true
end

@poire-z
Copy link
Contributor

poire-z commented Apr 10, 2019

Usually I have it disabled, but I tried both (with flash enabled, the s is shown on one of the screenshots above).

And if so, does the setDirty from 4c4efca do the trick?

Nope (just cut and pasted that at the bottom of virtualkeyboard.lua, no change).

(Sorry, leaving, can't test much till later this evening.)

@poire-z
Copy link
Contributor

poire-z commented Apr 10, 2019

It looks like we (logically, as most widgets do) need to have this to avoid this refresh issue:

+function VirtualKeyPopup:onCloseWidget()
+    UIManager:setDirty(nil, function()
+        return "partial", self[1][1].dimen
+    end)
+end

(which is called by UIManager when we do UIManager:close(self)).

Without that, when tapping outside, we get a full screen refresh (not sure what triggers it):

04/10/19-22:53:16 DEBUG no refresh got enqueued. Will do a partial full screen refresh, which might be inefficient
04/10/19-22:53:16 DEBUG _refresh: Enqueued partial update for region 0 0 600 610

and nothing when pan'releas'ing.

With that, when tapping outside, we just get the popup region refreshed:

04/10/19-23:02:20 DEBUG _refresh: Enqueued partial update for region 58 287 186 217

and the same when pan'releas'ing.

It's strange that you don't reproduce it.

Frenzie added a commit to Frenzie/koreader that referenced this pull request Apr 11, 2019
Frenzie added a commit that referenced this pull request Apr 11, 2019
mwoz123 pushed a commit to mwoz123/koreader that referenced this pull request Mar 29, 2020
mwoz123 pushed a commit to mwoz123/koreader that referenced this pull request Mar 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants