]> git.decadent.org.uk Git - ion3.git/blobdiff - ioncore/saveload.c
[svn-upgrade] Integrating new upstream version, ion3 (20070203)
[ion3.git] / ioncore / saveload.c
index e5902b302dec819020e92716aa4418d5d0777a2e..bb67ac1fcb482b5bb7f657421fafce6237071f5d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * ion/ioncore/saveload.c
  *
- * Copyright (c) Tuomo Valkonen 1999-2006
+ * Copyright (c) Tuomo Valkonen 1999-2007
  *
  * Ion is free software; you can redistribute it and/or modify it under
  * the terms of the GNU Lesser General Public License as published by
@@ -226,6 +226,14 @@ bool ioncore_init_layout()
     FOR_ALL_SCREENS(scr){
         ExtlTab scrtab=extl_table_none();
         bool scrok=FALSE;
+        
+        /* Potential Xinerama or such support should set the screen ID
+         * of the root window to less than zero, and number its own
+         * fake screens up from 0.
+         */
+        if(screen_id(scr)<0)
+            continue;
+
         if(ok)
             scrok=extl_table_geti_t(tab, screen_id(scr), &scrtab);
         
@@ -278,7 +286,14 @@ bool ioncore_save_layout()
         return FALSE;
     
     FOR_ALL_SCREENS(scr){
-        ExtlTab scrtab=region_get_configuration((WRegion*)scr);
+        ExtlTab scrtab;
+        
+        /* See note above */
+        if(screen_id(scr)<0)
+            continue;
+            
+        scrtab=region_get_configuration((WRegion*)scr);
+        
         if(scrtab==extl_table_none()){
             warn(TR("Unable to get configuration for screen %d."),
                  screen_id(scr));