X-Git-Url: https://git.decadent.org.uk/gitweb/?p=ion3.git;a=blobdiff_plain;f=ioncore%2Fsaveload.c;h=bb67ac1fcb482b5bb7f657421fafce6237071f5d;hp=e5902b302dec819020e92716aa4418d5d0777a2e;hb=20070203;hpb=8366314611bf30a0f31d25bf5f5023186fa87692 diff --git a/ioncore/saveload.c b/ioncore/saveload.c index e5902b3..bb67ac1 100644 --- a/ioncore/saveload.c +++ b/ioncore/saveload.c @@ -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));