This means we don't get a QProcess message because of test_no_loglines
not sending :quit, and we don't need to do so in test_ascii_locale as
there's nothing we need to wait for.
This adds the ability to open new tabs in the last-focused window
instead, which fixes#1801.
Right now the only other option is probably not that useful for human
users but it's required to make tests behave deterministically and
consistently. (But with #881 on the roadmap, I would implement this as
another choice)
To this end, also make the test framework set this option to preserve
the invariant against which existing tests are written: that spawning a
new window would effectively also focus it.
This was currently almost completely broken, yet nobody complained. The
new behavior (in the previous commit) makes this always hide the mouse
cursor, even when an input field has focus.
Since the only two easy options to implement are "never hide" and
"always hide", combined with the fact that both are sort of useless to
an end-user, just remove the option until somebody wants it back.
Right now, get('last-focused-main-window') essentially returns the same
as qApp.activeWindow(), since it's None when no window is focused. This
seems somewhat contrary to its original intent, so I've changed it to
only ever update the object.
This actually fixes another bug as well: on_focus_changed's new is not
always a MainWindow - in fact it's a WebView on my end. To fix this,
directly use the QApplication.activeWindow() to find the current focus.
That second bit in particular actually some related bugs that probably
nobody ever noticed or bothered reporting:
* _maybe_hide_mouse_cursor currently pretty much never gets called
* :adblock-update doesn't actually show any downloads
* ... probably more
This allows a specific keybinding, for whatever reason, to override the
default mode. Examples of when this could be useful:
* :hint --rapid --mode=word (to type them more rapidly)
* :hint --mode=letter input (if the default mode is number)
Also reword the description of 'group' to make the distinction between
'group' and 'mode' clearer.
We set PYTHONPATH so we can import qutebrowser.app in run_vulture.py
without installing it.
We also need to make sure all dependencies are installed so we can
actually import qutebrowser.
Since we now use QWebEngineScript, we can't easily know when the script
finished running and we can access window._qutebrowser.scroll.
We instead assume the initial position (if we don't get a
scrollPositionChanged) will always be (0, 0), and explicitly set it
to (None, None) (displaying ???) if we can't connect that signal.
We now load the JS code as a QWebEngineScript, which sets up
window._qutebrowser with various "modules". That means we don't have to
pass the whole module every time we want to execute something.