On Wed, Jul 5, 2023, 9:04 AM Evan Hand <elhandjr@...> wrote:
Hi Joe,
The code in the sbitx sbitx_gtk.c gets the screen size from the OS and adjusts the size of the gtk screen.? If you have two different monitors, the size will be the length and width of the screen placement area.? If the same size and position, all works well.? If the screens are offset, or the HDMI resolution is set to a higher value, then the sum of the two screens is used.
If you always use the 7" Raspberry Pi DSI screen, you can change the code in sbitx_gtk.c to a fixed value of 800x480.? You will need to comment out five lines and add back two like this:
From lines 3593 to 3606 in the latest sbitx_gtk.c:
You will need to ./build sbitx (NOT update) and then restart.
To get the gtk (legacy) screen to align on the DSI screen, you need to start the sbitx program on the DSI screen.? I do this by opening a terminal window, moving it to fit on the DSI screen, changing to the sbitx directory (folder), and then ./sbitx to start (the ./is required).? I made a shell script to add the mapping of the touch screen and redirect the error info to a file:
cd /home/pi/sbitx sudo xinput map-to-output "raspberrypi-ts" "DSI-1" ./sbitx &> errlog.txt
The alternative is to start the sbitx on the larger screen and minimize the gtk screen by clicking on the lowes righthand box on the gtk screen.? You may need to close the web interface to get to that screen.? You can always reopen by starting the Chrome browser and entering 127.0.0.1 in the URL box.