es.po update by rafa, add ms win10 cygwin port, add pulseaudio, new config flags...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / mainsession.C
index e0a8a8265f57752e73b347788500a9f8b4a3b116..a21297e0df7fa633bca7e129aafa68a0901d0050 100644 (file)
@@ -243,16 +243,20 @@ void MainSession::default_window_positions(int window_config)
                case 1024: right_w = 1280;  break;
                case 1200: right_w = 1600;  break;
                case 1080: right_w = 1920;  break;
-               default:   right_w = root_w/2;  break;
+               default:
+                       dual_head = 0;
+                       break;
                }
-               if( window_config == 1 ) {
-                       root_x = root_w - right_w;
-                       root_w = right_w;
-               }
-               else {
-                       // use same aspect ratio to compute left height
-                       root_w -= right_w;
-                       root_h = (root_w*root_h) / right_w;
+               if( dual_head ) {
+                       if( window_config == 1 ) {
+                               root_x = root_w - right_w;
+                               root_w = right_w;
+                       }
+                       else {
+                               // use same aspect ratio to compute left height
+                               root_w -= right_w;
+                               root_h = (root_w*root_h) / right_w;
+                       }
                }
        }
 
@@ -368,8 +372,12 @@ void MainSession::default_window_positions(int window_config)
 int MainSession::load_defaults(BC_Hash *defaults)
 {
 // Setup main windows
-       strcpy(a_x11_host, defaults->get("A_X11_HOST", a_x11_host));
-       strcpy(b_x11_host, defaults->get("B_X11_HOST", b_x11_host));
+       char *a_host = defaults->get("A_X11_HOST", a_x11_host);
+       if( a_host != a_x11_host )
+               strcpy(a_x11_host, defaults->get("A_X11_HOST", a_x11_host));
+       char *b_host = defaults->get("B_X11_HOST", b_x11_host);
+       if( b_host != b_x11_host )
+               strcpy(b_x11_host, defaults->get("B_X11_HOST", b_x11_host));
        window_config = defaults->get("WINDOW_CONFIG", window_config);
        default_window_positions(window_config);