Previously, the drawn hint labels were affected by the zoom, i.e., they
were stretched out by QtWebKit and actually had to be drawn at the
unzoomed position.
The Python/C++ API gives us coordinated adjusted for zoom, so
we always *negatively* adjusted them to get the unzoomed coordinates.
JS gave us the original coordinates, so we stretched them out according
to the zoom if adjust_zoom was given (which means only when clicking a
link).
Now we always operate in term of display coordinates: The point where we
draw the hint label is equal to the point we're clicking.
Thus, the zoom level for javascript is always adjusted, and the Python
zoom level is never (negatively) adjusted.
The following methods were only used for hint labels and thus removed
now:
- document_element
- create_inside
- find_first
- set_inner_xml
- remove_from_document
- set_style_property
Since we use pytest-xvfb, Xvfb is automatically started and stopped by
pytest. The herbstluftwm also runs in the "outer" Xvfb and is not
actually available inside the tests, as the tests run in another
display, while herbstluftwm runs in :0.
This patch removes herbstluftwm completely (it was not used until now,
so there shouldn't be a problem), and doesn't start Xvfb (the package is
still needed for pytest-xvfb to work).
Additionally, it adds the "xauth" package on debian, because we'll need
it anyway sooner or later. It's automatically included in Ubuntu and
Arch because xvfb depends on it, but on debian, xauth is only
recommended and not installed automatically.
If the clipboard contains "-a" then "open {clipboard}" will fail because
-a gets parsed as an option. "open -- {clipboard}" doesn't do that. See
some comments in #1791.
Fixes#1060.
In the process of adding this, I also decided to rewrite
mainwindow.get_window() for clarity (and also because flake8 was warning
about complexity).
Also adds some tests to the new-instance-target mechanism, in particular
a specific test for the issue in question.