Changeset a07534131108c5a92be78f47bd4b2ffc5515694c

Show
Ignore:
Timestamp:
06/26/2007 08:15:43 PM (2 years ago)
Author:
daf <daf>
git-committer:
daf <daf> 1182914143 +0000
git-parent:

[6a30cb16b58406bb105b1d79b3d5d5dcdbd9b0da]

git-author:
daf <daf> 1182914143 +0000
Message:

Dirty hack to fix xinerama --restore problem

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • ChangeLog

    rfecfb84 ra075341  
     1Tue Jun 26 23:22:06 EDT 2007    Dave Foster <daf@minuslab.net> 
     2        * Added dirty hack to make sure Xinerama codepath is not 
     3          taken when in restore mode.  Was having a problem where 
     4          my setup claimed I had a 1 screen Xinerama layout! 
     5 
    16Tue May 29 22:59:46 EDT 2007    Dave Foster <daf@minuslab.net> 
    27        * Added generic image icon (from tango theme).  Should 
  • src/NWindow.cc

    rea67e72 ra075341  
    222222                xinerama = XineramaIsActive(GDK_DISPLAY_XDISPLAY(disp->gobj())); 
    223223                xinerama_info = XineramaQueryScreens(GDK_DISPLAY_XDISPLAY(disp->gobj()), &xinerama_num_screens); 
    224          
     224 
    225225                if (xinerama_num_screens > 0) { 
    226226                        this->is_multihead = true; 
  • src/Util.cc

    rea67e72 ra075341  
    108108                xinerama_info = XineramaQueryScreens(GDK_DISPLAY_XDISPLAY(disp->gobj()), &xinerama_num_screens); 
    109109 
    110  
    111                 program_log("using xinerama"); 
    112  
    113                 bool foundfull = false; 
    114                 for (i=displist.begin(); i!=displist.end(); i++) 
    115                         if ((*i) == Glib::ustring("xin_-1")) 
    116                                 foundfull = true; 
    117  
    118                 if (foundfull) { 
    119                         if (cfg->get_bg(Glib::ustring("xin_-1"), file, mode, bgcolor)) { 
    120                                 program_log("setting full xinerama screen to %s", file.c_str()); 
    121                                 SetBG::set_bg_xinerama(xinerama_info, xinerama_num_screens, Glib::ustring("xin_-1"), file, mode, bgcolor);  
    122                                 program_log("done setting full xinerama screen"); 
     110                // dirty, dirty hack to make sure we're not on some crazy 1 monitor display 
     111                if (xinerama_num_screens > 1) { 
     112                        program_log("using xinerama"); 
     113 
     114                        bool foundfull = false; 
     115                        for (i=displist.begin(); i!=displist.end(); i++) 
     116                                if ((*i) == Glib::ustring("xin_-1")) 
     117                                        foundfull = true; 
     118 
     119                        if (foundfull) { 
     120                                if (cfg->get_bg(Glib::ustring("xin_-1"), file, mode, bgcolor)) { 
     121                                        program_log("setting full xinerama screen to %s", file.c_str()); 
     122                                        SetBG::set_bg_xinerama(xinerama_info, xinerama_num_screens, Glib::ustring("xin_-1"), file, mode, bgcolor);  
     123                                        program_log("done setting full xinerama screen"); 
     124                                } else { 
     125                                        std::cerr << _("Could not get bg info for fullscreen xinerama") << std::endl; 
     126                                } 
    123127                        } else { 
    124                                 std::cerr << _("Could not get bg info for fullscreen xinerama") << std::endl; 
    125                         } 
    126                 } else { 
    127  
    128                         // iterate through, pick out the xin_* 
    129                         for (i=displist.begin(); i!=displist.end(); i++) { 
    130                                 if ((*i).find(Glib::ustring("xin_").c_str(), 0, 4) != Glib::ustring::npos) { 
    131                                         if (cfg->get_bg((*i), file, mode, bgcolor)) { 
    132                                                 program_log("setting %s to %s", (*i).c_str(), file.c_str()); 
    133                                                 SetBG::set_bg_xinerama(xinerama_info, xinerama_num_screens, (*i), file, mode, bgcolor); 
    134                                                 program_log("done setting %s", (*i).c_str()); 
    135                                         } else { 
    136                                                 std::cerr << _("Could not get bg info for") << " " << (*i) << std::endl; 
     128 
     129                                // iterate through, pick out the xin_* 
     130                                for (i=displist.begin(); i!=displist.end(); i++) { 
     131                                        if ((*i).find(Glib::ustring("xin_").c_str(), 0, 4) != Glib::ustring::npos) { 
     132                                                if (cfg->get_bg((*i), file, mode, bgcolor)) { 
     133                                                        program_log("setting %s to %s", (*i).c_str(), file.c_str()); 
     134                                                        SetBG::set_bg_xinerama(xinerama_info, xinerama_num_screens, (*i), file, mode, bgcolor); 
     135                                                        program_log("done setting %s", (*i).c_str()); 
     136                                                } else { 
     137                                                        std::cerr << _("Could not get bg info for") << " " << (*i) << std::endl; 
     138                                                } 
    137139                                        } 
    138140                                } 
    139141                        } 
     142                 
     143                        // must return here becuase not all systems have xinerama 
     144                        program_log("leaving set_saved_bgs()");  
     145                        return; 
    140146                } 
    141  
    142                 // must return here becuase not all systems have xinerama 
    143                 program_log("leaving set_saved_bgs()");  
    144                 return; 
    145147        }  
    146148#endif