Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
Search
SBITX V2 - Second Monitor Issue
I run 2 monitors.? The touch screen and one 24 inch monitor. The only issue is when Sbitx app is? started the sbitx screen goes to the? large monitor but a quarter of the display on the right has disappeared. Basically the sbitx app screen is bigger than the display monitor screen. |
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: void ui_init(int argc, char *argv[]){
?
? gtk_init( &argc, &argv );
?
//we are using two deprecated functions here
//if anyone has a hack around them, do submit it
?
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
screen_width = gdk_screen_width();
screen_height = gdk_screen_height();
#pragma pop
?
q_init(&q_web, 1000); Change to: void ui_init(int argc, char *argv[]){
?
? gtk_init( &argc, &argv );
?
//we are using two deprecated functions here
//if anyone has a hack around them, do submit it
/*
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
screen_width = gdk_screen_width();
screen_height = gdk_screen_height();
#pragma pop
*/
? ? ? ? screen_width = 800 ; ? ? ? ? screen_height = 480 ; q_init(&q_web, 1000);
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. I hope this helps. 73 Evan AC9TU |
Thanks for info.. Sorting it out? Joe On Wed, Jul 5, 2023, 9:04 AM Evan Hand <elhandjr@...> wrote: Hi Joe, |
to navigate to use esc to dismiss