Ah sorry, it's not a timing problem. It doesn't just return None during startup, it stays None when the script is run as a startup application. Attaching a test script. When this is run from a Gnome terminal, the contents of /tmp/awtest.txt becomes:
running awtest window: <class 'Xlib.display.Window'>(0x02400006) window: <class 'Xlib.display.Window'>(0x02400006) window: <class 'Xlib.display.Window'>(0x02400006)
And so on, but when it's run as a startup application, I get:
running awtest window: None window: None window: None
It never changes to an actual window. I also tried it with the line 'ewmh = EWMH()' inside the loop, but that made no difference.
I haven't verified that this is an actual problem in caffeine, but the way I read the code, it should mean that it never deactivates the screensaver.
Ah sorry, it's not a timing problem. It doesn't just return None during startup, it stays None when the script is run as a startup application. Attaching a test script. When this is run from a Gnome terminal, the contents of /tmp/awtest.txt becomes:
running awtest Window' >(0x02400006) Window' >(0x02400006) Window' >(0x02400006)
window: <class 'Xlib.display.
window: <class 'Xlib.display.
window: <class 'Xlib.display.
And so on, but when it's run as a startup application, I get:
running awtest
window: None
window: None
window: None
It never changes to an actual window. I also tried it with the line 'ewmh = EWMH()' inside the loop, but that made no difference.
I haven't verified that this is an actual problem in caffeine, but the way I read the code, it should mean that it never deactivates the screensaver.