i3: Bug i3 with tkinter application. I3 seems to stop replying.
Output of i3 --moreversion 2>&- || i3 --version
:
Binary i3 version: 4.13 (2016-11-08) © 2009 Michael Stapelberg and contributors
Running i3 version: 4.13 (2016-11-08) (pid 451)to abort…)
Loaded i3 config: /home/tau/.i3/config (Last modified: Mon 20 Mar 2017 10:54:15 PM -03, 545611 seconds ago)
The i3 binary you just called: /usr/bin/i3 The i3 binary you are running: i3
REPLACE: i3 version output 03/27/2017 06:28:04 AM - Additional arguments passed. Sending them as a command to i3. [{“success”:false,“parse_error”:true,“error”:“Expected one of these tokens: <end>, ‘[’, ‘move’, ‘exec’, ‘exit’, ‘restart’, ‘reload’, ‘shmlog’, ‘debuglog’, ‘border’, ‘layout’, ‘append_layout’, ‘workspace’, ‘focus’, ‘kill’, ‘open’, ‘fullscreen’, ‘sticky’, ‘split’, ‘floating’, ‘mark’, ‘unmark’, ‘resize’, ‘rename’, ‘nop’, ‘scratchpad’, ‘title_format’, ‘mode’, ‘bar’”,“input”:“version”,“errorposition”:“^^^^^^^”}]
The application below after running and one pressing ‘Return’ it should quit the application and give back focus to the previous active windows. it seems i3 stops replying to commands from the keyboard and i have to click on some container to get things working again. Replacing <Return> for all other kind of events it fails too. Notice, it fails if you replace Entry for Button too.
I have other application that depends on the correct behavior. I hope you guys have how to fix it.
Obs: if i comment self.resizable… it fails too.
from Tkinter import *
class BugI3(Tk):
def __init__(self, title, default_data='', *args, **kwargs):
Tk.__init__(self, *args, **kwargs)
# when one quits the application
# from an event it just makes i3 misbehaves
# it cant get focus back to the previous application.
self.bind('<Return>', lambda e: self.quit())
self.title(title)
self.resizable(0, 0)
self.entry = Entry(self)
self.entry.pack(side='left', expand=True, fill=BOTH)
if __name__ == '__main__':
bugi3 = BugI3('Word Pass')
bugi3.mainloop()
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 23 (9 by maintainers)
Commits related to this issue
- Refocus focused window for FOCUS_IN events on the root window. This deals with (admittedly somewhat misbehaving) clients which use XSetInputFocus to take focus, but then don't properly restore focus.... — committed to Airblader/i3-original by Airblader 7 years ago
- Refocus focused window for FOCUS_IN events on the root window. (#3097) This deals with (admittedly somewhat misbehaving) clients which use XSetInputFocus to take focus, but then don't properly resto... — committed to i3/i3 by Airblader 6 years ago
Have been running the patch on my work and home machines (on top of 2eca0f0 (master) and e9abc064de8dbde6602c363975e8ef8a1624cab (next) respectively) approaching two weeks > 8 hrs /day now. It solves the issue for me and doesn’t appear to have any negative side effects.
For me, the issue manifested when my password-gorilla session timed out and reverted to the master password window. If I used the mouse to click “exit” to close password-gorilla altogether, my keyboard would stop working until I switched workspaces back and forth using the mouse on the i3bar. This no longer happens with @Airblader’s patch.