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
Per one of the diff comments on #1597:
> I used to use a tuple for constant things, but nowadays I'd actually
> prefer a list as a tuple is something more heterogeneous (i.e. it
> makes sense to have a `(x, y)` point as a tuple, but a list of points
> would be a list).
> At some point I should probably change it to a list everywhere 😉
This way, all temporary downloads will end up in the same directory and
everything is cleaned up at program exit, not when the corresponding
window is closed.
`buffer` takes either a tab index or a string and focuses the specified
tab. The index can be of the form [0-9]+ which will switch to the
relevant tab in the current window or [0-9]+/[0-9]+ (that is
win_id/index) which will focus the specified window before switching
tabs. If a string is passed the list of open tabs across all windows is
sorted based on title and url (just like in the completion widget) and
the top result is selected.
There are a lot of problems and flakiness with using a real clipboard.
Instead we now have a :debug-set-fake-clipboard command to set a text, and use
logging when getting the contents.
Fixes#1285.
This hopefully helps with issues on the Windows buildbot:
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "C:\Users\florian\buildbot\slave\win8\build\.tox\py34\lib\shutil.py", line 371, in _rmtree_unsafe
os.unlink(fullname)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\florian\\AppData\\Local\\Temp\\qutebrowser-basedir-ixuexfeu\\data\\local-storage\\qrc__0.localstorage'
Before it couldn't get deleted because Qt still kept the icon database open in
some way.
By clearing it when shutting down, this works correctly.
Fixes#1017.
This caused a PendingDeprecationWarning with Python 3.5:
Traceback (most recent call last):
File "/home/florian/proj/qutebrowser/git/qutebrowser/utils/debug.py", line 237, in log_time
yield
File "/home/florian/proj/qutebrowser/git/qutebrowser/app.py", line 433, in _init_late_modules
next(reader)
StopIteration
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/florian/proj/qutebrowser/git/qutebrowser/app.py", line 433, in _init_late_modules
next(reader)
File "/usr/lib64/python3.5/contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
PendingDeprecationWarning: generator 'log_time' raised StopIteration