Hi, I'm experiencing a problem with quake mode pref hide on focus lost. When I start tilix in quake mode after enabling the pref the tilix window appears with my defined layout. Pressing the quake mode hotkey hides the window, but it returns promptly on screen again. Disabling the hide on focus lost pref returns all things tilix back to normal.
Posting relevant info below. Anything out of the ordinary in my prefs that could cause this? Or am I not supposed to start quake mode with a session?
Regards.
= = =
$ tilix -q -s $HOME/.tilix-sessions/tilix.dropdown.json
= = =
$ cat $HOME/.tilix-sessions/tilix.dropdown.json
{
"child": {
"child1": {
"child1": {
"directory": "\/home\/glitsj16\/Downloads",
"height": 400,
"profile": "06f9ae90-dca8-4e14-8762-6cc23c707345",
"readOnly": false,
"synchronizedInput": true,
"type": "Terminal",
"width": 700
},
"child2": {
"directory": "\/home\/glitsj16\/Downloads",
"height": 400,
"profile": "06f9ae90-dca8-4e14-8762-6cc23c707345",
"readOnly": false,
"synchronizedInput": true,
"type": "Terminal",
"width": 700
},
"orientation": 1,
"position": 50,
"type": "Paned"
},
"child2": {
"directory": "\/home\/glitsj16\/Downloads",
"height": 800,
"profile": "06f9ae90-dca8-4e14-8762-6cc23c707345",
"readOnly": false,
"synchronizedInput": true,
"type": "Terminal",
"width": 700
},
"orientation": 0,
"position": 50,
"type": "Paned"
},
"height": 800,
"name": "sysops",
"synchronizedInput": false,
"type": "Session",
"version": "1.0",
"width": 1400
}
= = =
$ tilix --version
Versions
Tilix version: 1.5.4
VTE version: 0.46
GTK Version: 3.22.10
Tilix Special Features
Notifications enabled=0
Triggers enabled=0
Badges enabled=0
= = =
$ dconf dump /com/gexperts/Tilix/ > tilix.dconf
$ cat tilix.dconf
[profiles]
list=['06f9ae90-dca8-4e14-8762-6cc23c707345', '4d73e800-4452-42a7-9513-4c828e73fdaf']
default='06f9ae90-dca8-4e14-8762-6cc23c707345'
[profiles/06f9ae90-dca8-4e14-8762-6cc23c707345]
visible-name='Default'
default-size-columns=124
default-size-rows=32
show-scrollbar=false
cursor-shape='ibeam'
scroll-on-output=true
use-theme-colors=true
use-system-font=false
terminal-bell='none'
font='Inconsolata Bold 11'
allow-bold=false
scrollback-unlimited=true
notify-silence-threshold=0
cursor-blink-mode='off'
background-transparency-percent=60
[profiles/4d73e800-4452-42a7-9513-4c828e73fdaf]
visible-name='SysOps'
default-size-columns=124
default-size-rows=32
show-scrollbar=false
cursor-shape='ibeam'
scroll-on-output=true
use-system-font=false
terminal-bell='none'
font='Inconsolata Bold 11'
allow-bold=false
scrollback-unlimited=true
cursor-blink-mode='off'
background-transparency-percent=60
[/]
prompt-on-close=false
notify-on-process-complete=false
quake-height-percent=94
quake-hide-lose-focus=false
copy-on-select=true
auto-hide-mouse=true
recent-session-files=['/home/dirkos/.local/share/data/dev.sda4/tilix.dropdown.json', '//home/dirkos/.local/share/data/dev.sda4/tilix.dropdown.json']
window-style='normal'
terminal-title-style='none'
theme-variant='dark'
new-instance-mode='focus-window'
app-title='${title}'
paste-strip-first-char=true
quake-hide-headerbar=true
quake-show-on-all-workspaces=false
focus-follow-mouse=true
quake-width-percent=90
terminal-title-show-when-single=true
[keybindings]
session-switch-to-terminal-9='disabled'
session-switch-to-terminal-left='disabled'
terminal-page-up='disabled'
session-close='disabled'
win-switch-to-session-0='disabled'
terminal-copy='disabled'
win-switch-to-session-2='disabled'
session-resize-terminal-left='disabled'
session-add-down='
terminal-find-next='disabled'
terminal-page-down='disabled'
terminal-paste='disabled'
app-new-session='disabled'
session-switch-to-terminal-right='disabled'
session-switch-to-terminal-5='disabled'
win-switch-to-previous-session='disabled'
session-add-right='
session-switch-to-terminal-up='disabled'
win-switch-to-next-session='disabled'
terminal-find-previous='disabled'
terminal-zoom-in='disabled'
session-switch-to-previous-terminal='disabled'
session-resize-terminal-right='disabled'
terminal-close='
terminal-scroll-up='disabled'
win-fullscreen='disabled'
win-switch-to-session-8='disabled'
terminal-scroll-down='disabled'
terminal-select-bookmark='disabled'
win-switch-to-session-5='disabled'
win-switch-to-session-1='disabled'
app-new-window='disabled'
terminal-zoom-out='disabled'
terminal-select-all='disabled'
session-switch-to-terminal-down='disabled'
win-switch-to-session-3='disabled'
win-switch-to-session-4='disabled'
win-switch-to-session-6='disabled'
win-switch-to-session-7='disabled'
session-resize-terminal-down='disabled'
terminal-zoom-normal='disabled'
session-save='disabled'
terminal-paste-primary='disabled'
win-switch-to-session-9='disabled'
win-view-sidebar='disabled'
nautilus-open='disabled'
terminal-maximize='disabled'
win-view-session-switcher='disabled'
session-switch-to-terminal-0='disabled'
session-switch-to-terminal-1='disabled'
session-switch-to-terminal-2='disabled'
session-resize-terminal-up='disabled'
session-switch-to-terminal-3='disabled'
session-switch-to-next-terminal='disabled'
session-open='disabled'
session-switch-to-terminal-7='disabled'
session-switch-to-terminal-8='disabled'
session-switch-to-terminal-6='disabled'
session-switch-to-terminal-4='disabled'
terminal-find='disabled'
I can reproduce
Sorry spoke too soon, my keyboard shortcut wasn't configured properly in Gnome Shell as I was testing it with something else. After fixing that and pointing it back at tilix things work as expected.
What version of tilix are you using?
Never mind I see the version :)
Any chance you are using Wayland?
No I'm using gnome-xorg session on Arch Linux. I've installed tilix from the AUR package tilix-bin, and that's at version 1.5.4-2 currently. I'll do a git install and test that in a minute. Double-checked, nothing weird is conflicting with my shortcut association.
No improvement when running current git version. Tried changing the shortcut (sh -c "tilix -q" / tilix --quake / tilix -q) but still the same issue. As soon as I uncheck the Hide window when focus is lost the issue disappears. And the issue doesn't show when I run tilix -q from xfce4-terminal instead of using the assigned shortcut.
$ tilix --version
Versions
Tilix version: 1.5.5
VTE version: 0.46
GTK Version: 3.22.10
Tilix Special Features
Notifications enabled=0
Triggers enabled=0
Badges enabled=0
Thanks, I'll look into it some more but I won't have time until the weekend as I'm stuck at a work conference for the next few days.
No rush, thanks for your response. For now i disabled hiding on lost focus. Looking at the PKGBUILD for tilix-git I noticed that it uses
make DC='ldmd' DCFLAGS='-O -inline -release -version=StdLoggerDisableTrace'
I'll dig around how to build a debug version so I can provide more detailed info.
Regards.
So I had a look at this on more detail. One thing I noticed is that your use of $HOME wasn't working since tilix doesn't resolve environment variables. I've checked in some code to address this and the session file is now loading as expected.
I do have an issue with the sidebar appearing for some reason, as far as I can tell nothing I'm doing should be causing this. However, I still can't reproduce the focus issue, it is working fine for me here.
Thanks for looking into this again. Session loading is working as expected now. I don't see the sidebar issue you mention. No change in the hotkey situation when enabling 'hide on focus lost'. I tried everything I can come up with, incl. removing all prefs in dconf and creating a new user. With a new user the reported issue appears again as soon as I enable 'hide on focus lost'. At a loss, so I gave up on enabling the option. If I ever get it working or notice a change when upgrading tilix I'll report it here.
Thanks for all your efforts.
I made a couple of minor changes to improve this but doubt it will actually fix it. Having said that, if you are on the tilix-git package feel free to give it a whirl and see if it helps at all.
Thanks for info. But alas, the mentioned changes don't fix the hotkey issue for me.
I still cannot reproduce the issue, is anyone else having this problem?
Yes, I'm having exactly the same issue on ubuntu-gnome 17.04 using Tilix 1.5.6
Steps to reproduce:
Expected result:
Actual behavior:
@nicolas-simplex I just tried it with Ubuntu Gnome 17.04 in a VM and didn't have the issue unfortunately.
I'm having exactly the same issue on ubuntu-gnome 17.04. I'm using Tilix from PPA, version 1.5.8. The result is the same described by nicolas-simplex. However sometimes my gnome-shell crashes when I use the shortcut to hide Tilix.
I saw the following line in dmesg:
gnome-shell[8080]: segfault at 38 ip 00007fdbf11b0728 sp 00007ffeeaa173a0 error 6 in libgnome-shell.so[7fdbf1187000+29e000]
I confirm the same issue mentioned by others about the shortcut key in quake mode.
I did a fresh install of arch linux using xfce4 and tilix. When I enable --quale mode with the option "Hide window when focus is lost" DISABLED tilix works fine. Pressing the shortcut key it appears, pressing it again it hides as expected.
If I enable the option "Hide window when focus is lost" then tilix becomes buggy. Pressing the shortcut key tilix appears, pressing it again il flickers, hides and reappears again.
I'm pretty sure it is a timing issue, unfortunately not being able to reproduce it in a VM makes it difficult to fix. If someone who is a coder has the issue and is willing to debug it I'm happy to provide advice and guidance on where to look.
@gnunn1 I've collected some more info. As I'm not a professional coder this is the best I could come up with. Info was collected on arch linux, using tilix-git (edited to not strip debug info). Perhaps it throws some more light on the issue.
https://gist.github.com/glitsj16/3d4e1c60bf1cf9163ddb83ba7d788268 --> debug info 'hide on focus lost'
https://gist.github.com/glitsj16/68b65fe9cc63e07f38a0013aebb26080 --> debug info no 'hide on focus lost'
If I can provide anything usefull, feel free to ask. I can imagine this is very frustrating without you being able to reproduce. Your efforts are very much appreciated nonetheless.
There is this bug in report in Ubuntu, folks had this problem when using keys to change the laptop screen brightness for example. The idea is that the window briefly loses focus when a global hot key is pressed:
https://bugs.launchpad.net/gnome-settings-daemon/+bug/1244090
It kind of fits what is being seen, let's assume this bug exists so this is the sequence of events I would expect to happen:
This effectively prevents the window from hiding on the hot key. But I'm not sure it's related, for one there seems to be a pretty diverse set of DEs experiencing this issue.
I think to prove this out, if you run tilix and only use the hot key I'm thinking you should never see the trace message Focus lost, hiding quake window appear. I'll test it on my machine shortly to make sure that is the case.
I still see the message Focus lost, hiding quake window so that's not it. I need to investigate some more.
Reviewing my code, I do see I have a timing thing going on, @glitsj16 can you try playing around with the value 100 at line 1570, this is the number of milliseconds it waits before actually hiding the window. I think I'm trying to deal with that hotkey issue.
threadsAddTimeoutDelegate(100, delegate() {
if (isVisible()) {
this.hide();
}
return false;
});
@gnunn1 I'll need about an hour to get back at the machine. Will report back asap with results related to your code pointer.
Regards.
@gnunn1 Okay, I have taken the time to experiment with the timeout value in appwindow.d, you're definately on the mark. Here are my observations, using the same session as per the original filing of this issue:
(a) when setting the timeout lower than 500 milliseconds, the issue stays unchanged and keeps showing itself;
(b) the sweetspot on my machine & with my tilix configuration is exactly 600 milliseconds - with that value everything works as expected, both toggling the quake mode key and hiding on focus lost - alas, after a few iterations of toggling the key gnome-shell always crashes;
(c) anything above 700 works as expected, but a visual blip is noticeable when toggling the key: tilix window returns briefly but does dissapear again.
I get the second best result with 598, which still works as expected, yet sometimes (i counted 1 out of 8 times) the same visual blip is noticeable, yet no crashes so far. All in all a difficult call I'd say. Will keep testing with the 598 value during the day and if I experience a gnome-shell crash I will report back.
HTH, best of luck!
Tested this on my system, too. With the default 100ms I can clearly reproduce the issue. But it starts working reliable at about 125ms, at least I could not reproduce the behavior once with that value. I am using Arch with latest Gnome Shell on a laptop with Intel Core i5-3210M .
A higher timeout of 600ms works well for me from a usability point of view, the longer delay is not so noticeable. But it causes some weird behavior when hitting the hotkey multiple times quickly. E.g. when the quake window is shown and I hit the hotkey twice, the window will hide, show again quickly and hide again (it is probably hide due to hotkey, show due to hotkey, hide due to focus loss after timeout). With a shorter timeout this works as expected (hide and show again).
As always once you have to fall back to artificial timeouts things start to become very dependent on the system performance :(
Couldn't agree more, this fall-back looks very system-dependent indeed. It might be helpful if the other people who reported the issue would post their observations too. Here's a small how-to for those willing to test on Ubuntu: https://git.io/vHPTV.
Untill there's a better fix it might not be a bad idea to add a customizable timeout value to the hide on focus lost pref. Or drop the pref alltogether, toggling a key isn't that much effort IMO.
I think either this gets fixed in a way that removes the need for timing or I'll just drop the option completely. I probably won't get a chance to look at this in any depth until the weekend of the 17th as I'm travelling all next week.
I'm going to "hide" this feature by not exposing it in the UI any longer and I'll add a preference to control the timing which will be similarly hidden (i.e. require dconf-editor to change). I don't see any obvious way to make this work other then rely on timing. There is an upstream bug for this in Gnome but doesn't sound like it will get fixed anytime soon.
I've added the new option to control the delay of hiding the quake window and I've left the option enabled. I was worried it wouldn't be comprehensible but I think expressing it as a delay for hiding the window communicates the intent enough.
Most helpful comment
Yes, I'm having exactly the same issue on ubuntu-gnome 17.04 using Tilix 1.5.6
Steps to reproduce:
Expected result:
Actual behavior: