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

fdo: Using Alt+Left or Alt+Right to go back/forward results in error #20

Closed
aperezdc opened this issue May 31, 2018 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@aperezdc
Copy link
Member

Using Alt+Left:

** (cog:10901): CRITICAL **: 15:21:39.085: void webkit_web_view_go_back(WebKitWebView*): assertion 'WEBKIT_IS_WEB_VIEW(webView)' failed

Conversely, with Alt+Right:

** (cog:10901): CRITICAL **: 15:21:39.745: void webkit_web_view_go_forward(WebKitWebView*): assertion 'WEBKIT_IS_WEB_VIEW(webView)' failed
@aperezdc aperezdc added the bug Something isn't working label May 31, 2018
@elima
Copy link
Contributor

elima commented May 31, 2018

This is coming from old code, when that code had access to the WebKitWebView object. Nowadays that object is kept by cog.c, and the platform-fdo's reference is null; hence the error.

IMO, the correct way to fix this is to define a key-binding interface in cog's launcher and move these calls there.

@aperezdc
Copy link
Member Author

@elima Indeed, having some way of allowing Cog to request key bindings from a platform plug-in would be the best.

In the meantime, if we want to fix the hardcoded keybindings provided by the FDO platform plug-in, a stopgap measure could to obtain the Web view with:

WebKitWebView *web_view = cog_launcher_get_web_view (cog_launcher_get_default ())

This will work fine due to CogLauncher being a singleton. I'll have a patch for this in a bit.

aperezdc added a commit that referenced this issue May 31, 2018
Using the API to retrieve the singleton avoids needing to keep a
reference to it in in a static variable. Also, this makes it possible
to retrieve the WebKitWebView to handle the keybindings.

Fixes #20
aperezdc added a commit that referenced this issue Jun 1, 2018
Using the API to retrieve the singleton avoids needing to keep a
reference to it in in a static variable. Also, this makes it possible
to retrieve the WebKitWebView to handle the keybindings.

Fixes #20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants