Touch not working


Does anyone have any idea why touch does not work when application is started from script after LXDE loaded?

But when I run the program manually, that is from command line, program works as intended.

I use RPI3, running Raspbian Jessie.

Thank you


I’ve done some further testing and it seems that in order to use touchscreen you have to to touch it before application starts.

Using Waveshare 7 inch touchscreen.