I have a customized linux (Debian, we've removed the desktop environment), where we run our application with X11. The screen size is 1024x768, and the app's window fills the screen. Now the application's window's width is 2048, and an other monitor is connected to the computer with HDMI. The resolution of the second monitor is also 1024x768.
We have 2 problems:
Case 1: If the HDMI is pluged, and I start the computer, and our app starts after the boot process, we can see that our window fills the two monitors. But in this case if I touch the computer's screen (touchscreen) on the (X;Y) position, the system thinks we've touched that screen on (X*2;Y).
Case 2: If the HDMI is unplugged, and I start the computer, our app starts after the boot process. I plug the HDMI AFTER THIS, and I reconfigure the X11 to use dual monitor. In this case I can see my app on the computer's screen, but I can not see the left half of my app on the second screen, only the X11 background. The touch works perfectly, but my mouse cursor stucks on the first screen.
This is the command what I use for X11 configuration:
xrandr --output HDMI1 --mode 1024x768 --pos 1024x0 --rotate normal --output eDP1 --mode 1024x768 --pos 0x0 --rotate normal
I always execute this command before starting my application. What is the problem (or problems)?