Hofmann Johannes wrote:
Hi Justus,
On Mon, Mar 09, 2009 at 05:59:31PM +0100, Justus Winter wrote:
Hey folks :)
I've got a new toy (the Neo FreeRunner) and dillo2 runs quite nicely on that little device, but there are some problems:
* there is no way to create bookmarks
What about the context menus in general? Is there no way to simulate a right mouse click? dillo uses context menus in many cases so we probabely need a general solution for this. There is a module for gtk2 (libgtkstylus.so) that simulates a right click when the user holds the left mouse button, that works quite nicely in practice.
That was actually what I wanted to implement at first. I looked through the fltk2 event handling code (most thoroughly with respect to the button widget) and I am convinced that this behavior cannot be implemented without patching fltk2 since the widgets do not call the callback when the button is pressed but only when it's released. I prototyped a solution that abuses the DRAG events to detect PUSH events, but that didn't work very well since DRAG events are only emitted when the cursor moves. Patching fltk2 to also call the callback function on PUSH events is problematic since (at least in dillo2) many callback functions do not test properly whether they are actually interested in that particular event and just assume that it must have been a RELEASE event.
Adressed in the second patch which adds an add bookmark button to the main toolbar.
What about a dillorc option to make it optional like the other buttons? Sure thing, that would be great. It shouldn't be too hard to make the toolbar content configurable.
* the scrollbars are unusable without a stylus
A more natural way of scrolling on embedded devices with touchscreens is finger scrolling. A proof of concept is attached as the third patch.
Didn't look at the code yet, but the concept seems nice. Maybe we could ship a "dillorc.handheld" or something like that...
The changes are actually quite small since a similar functionality was already present, namely panning via the middle mouse button. My patch just adds a configuration option to do so with the left button and to fiddle with the event handling code (you have to pass some events to the page content or you end up with a browser with non functional links :)). Note that this is just a mockup that needs some cleanups (works only for the first tab, need to adjust the open tab functionality in uicmd, text selection works fine with a mouse but is next to impossible on the moko due to double click tolerances (at least thats what I think)). And the text selection part is not configurable at the moment, that's the most problematic part. Any thoughts on how to make dw configurable at runtime while keeping it implementation agnostic with respect to the frontend? Justus