You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I bind for example, to the window::focus event (or Event.WINDOW_FOCUS, it doesn't matter), the handler is being executed on each window event, no matter it's change type (part after ::).
The text was updated successfully, but these errors were encountered:
both these examples misbehaves:
(PS, i have limited knowledge of python and asyncio stuff, the documentation is confusing with all the examples using asyncio, i first thought that was the problem...)
#!/usr/bin/env python3importasynciofromi3ipc.aioimportConnectiondefon_new_title(i3, e):
print(f'this should only print on title change: {e.change}')
asyncdefmain():
i3=awaitConnection().connect()
fromi3ipcimportEventi3.on(Event.WINDOW_TITLE, on_new_title)
awaiti3.main()
if__name__=="__main__":
asyncio.run(main())
#!/usr/bin/env python3fromi3ipcimportEventfromi3ipcimportConnectioni3=Connection()
defon_new_title(i3, e):
print(f'this should only print on title change: {e.change}')
i3.on('window::title', on_new_title)
i3.main()
When I bind for example, to the
window::focus
event (orEvent.WINDOW_FOCUS
, it doesn't matter), the handler is being executed on eachwindow
event, no matter it's change type (part after::
).The text was updated successfully, but these errors were encountered: