Commit Graph

30 Commits

Author SHA1 Message Date
Florian Bruhin
7e7fbf106b Fix lint and old config options 2017-07-04 14:42:56 +02:00
Florian Bruhin
c8c9536beb Fix completion stuff 2017-07-02 22:17:33 +02:00
Florian Bruhin
c2e75bf2fd Initial conversion to new config syntax 2017-07-02 22:17:33 +02:00
Florian Bruhin
822623f2ed Finally update copyrights... 2017-05-09 21:37:03 +02:00
Florian Bruhin
e8443241df Allow input -> mouse-zoom-divider to be 0 2017-02-22 05:15:57 +01:00
Florian Bruhin
de50f30b9b Replace all GitHub links 2017-02-05 00:13:11 +01:00
Florian Bruhin
021b3645cc Don't stack zoom level messages
Fixes #1980
2017-02-04 23:42:55 +01:00
Florian Bruhin
2c46f8ecdb Fix zoom handling with QtWebKit 2017-02-04 23:30:12 +01:00
Florian Bruhin
e8bbc1adf8 QtWebEngine: Fix insert mode checks with zoom
Fixes #2169
2017-02-04 22:12:41 +01:00
Florian Bruhin
6cd4105ea1 Fix long line 2017-02-04 00:11:48 +01:00
Florian Bruhin
66719c5ecc Fix lint 2017-02-03 23:55:14 +01:00
Florian Bruhin
545539f28d Do more sophisticated clicking for hints with QtWebEngine
We now use click() or focus() in JS if possible, or manually follow links in a
href attribute.

While this probably introduces some new corner cases, it fixes a handful of
older ones:

- window.open() in JS can now be handled correctly as we don't need hacks in
  createWindow anymore.
- Focusing input fields with images now works - fixes #1613, #1879
- Hinting now works better on QtWebEngine with Qt 5.8 - fixes #2273

Also see #70.
2017-02-03 23:21:57 +01:00
Florian Bruhin
ba2f4fb1b9 Use event_target to filter out mouse events
Fixes #2262
2017-02-01 13:08:11 +01:00
Florian Bruhin
643cf3f578 Fix various small mouse scrolling issues 2016-12-29 00:38:52 +01:00
Fritz Reichwald
f25c5dedd6 First try for horizontal scrolling with mouse 2016-12-29 00:21:42 +01:00
Florian Bruhin
5de07246be Handle clicks via createWindow with QtWebEngine
Before, we used the same logic for QtWebKit and QtWebEngine, where we
simply set an attribute on the tab on a mousePressEvent and then handled
opening links in acceptNavigationRequest.

However, this caused random links to pop up in new tabs (probably to
things being much more async?) on QtWebEngine, so we now handle those
cases in createWindow and only use override_target from the tab there.

Fixes #2102.
2016-11-14 06:52:33 +01:00
Florian Bruhin
adcd8a7220 Fix lint 2016-11-10 08:53:44 +01:00
Florian Bruhin
bbd842bd82 Get rid of modeman.maybe_leave 2016-11-10 07:19:45 +01:00
Florian Bruhin
f16b96aa28 Initial implementation of new messages 2016-09-15 14:51:21 +02:00
Florian Bruhin
fe11e25430 Ignore mouse events going to non-main widgets
When we hide the context menu on QtWebEngine, we get a mouse event
relative to the QMenu in the filter, which means tab.elements.at_pos
will get called with a negative position (and thus assert) or at least a
wrong position.
2016-08-19 18:38:07 +02:00
Florian Bruhin
d3084dd690 Add a separate tab.elements object 2016-08-18 14:01:27 +02:00
Florian Bruhin
1138d068e6 Move insert-mode-on-click to tab API / mouse.py
This also implements the feature for QtWebEngine.
2016-08-16 16:22:18 +02:00
Florian Bruhin
fb07655e56 Move input -> rocker-gestures to MouseEventFilter 2016-08-11 18:51:51 +02:00
Florian Bruhin
e8980d01e6 MouseEventFilter: Don't pass obj to handlers 2016-08-11 18:51:50 +02:00
Florian Bruhin
3bffb71b55 QtWebEngine: Implement mouse opentarget handling
This moves various stuff around and out of QtWebKit code:

- open_target and hint_target are now in TabData, not on the WebPage

- As much as possible got extracted from WebPage.acceptNavigationRequest
  to AbstractTab._on_link_clicked, with a new link_clicked signal added
  to WebPage. However, we need to decide whether to handle the request
  in this tab or not inside acceptNavigationRequest, so we have some
  code duplicated there and in WebEnginePage.acceptNavigationRequest.

- _mousepress_opentarget (i.e., setting the open_target) is now handled
  in MouseEventFilter, not in WebView.
2016-08-11 16:09:59 +02:00
Florian Bruhin
1a94cb551c Move mouse wheel zooming to MouseEventHandler 2016-08-11 13:50:06 +02:00
Florian Bruhin
677bb29251 Document event filter attributes 2016-08-11 13:38:20 +02:00
Florian Bruhin
b801d3316d Fix lint 2016-08-10 20:23:41 +02:00
Florian Bruhin
64afc562b6 Install MouseEventFilter on new WebEngine children
For some reason, when e.g. visiting duckduckgo and then heise.de,
QtWebEngine suddenly gets a new QOpenGLWidget as focusProxy.

We install an extra eventFilter observing the ChildAdded event and
re-adding the MouseEventFilter when that happens.
2016-08-10 19:44:06 +02:00
Florian Bruhin
f908d29a5f Move mouse handling to an EventFilter 2016-08-10 16:44:40 +02:00