Logo Search packages:      
Sourcecode: kde-guidance version File versions  Download package

def displayconfigabstraction::XSetup::setLayout (   self,
  layout 
)


Keyword arguments:
layout - XSetup.LAYOUT_SINGLE, XSetup.LAYOUT_CLONE or XSetup.LAYOUT_DUAL.

Definition at line 898 of file displayconfigabstraction.py.

00898                               :
        """
        
        Keyword arguments:
        layout - XSetup.LAYOUT_SINGLE, XSetup.LAYOUT_CLONE or XSetup.LAYOUT_DUAL.
        """
        self.layout = layout
        
        if self.layout==XSetup.LAYOUT_SINGLE:
            for gfxcard in self.gfxcards:
                gfxcard.setLayout(XSetup.LAYOUT_SINGLE)
            self.xinerama = False
        elif self.layout==XSetup.LAYOUT_DUAL:
            # 'xinerama' screens can be combined by the ServerLayout xorg.conf
            # sections into a multihead configurations. Gfxcard objects just
            # have to output xinerama friendly xorg.conf device and screen
            # sections.
            self.xinerama = True
            for gfxcard in self.gfxcards:
                gfxcard.setLayout(XSetup.LAYOUT_SINGLE_XINERAMA)
                
            # Check if the primary and secondary screen are on the same gfx card.
            # If so then see if the gfxcard can directly (read: accelarated) support
            # the layout we want.
            if self.primary_screen._getGfxCard() is self.secondary_screen._getGfxCard():
                if self.primary_screen._getGfxCard().getAvailableLayouts() & self.layout:
                    self.primary_screen._getGfxCard().setLayout(self.layout)
                    self.xinerama = False
        
        elif self.layout==XSetup.LAYOUT_CLONE:
            
            # If the graphics card itself has both heads and it can offer a better clone
            # mode, then we use that instead of faking it with xinerama.
            if (self.secondary_screen._getGfxCard() is self.primary_screen._getGfxCard()) \
                    and (self.primary_screen._getGfxCard()._getAvailableLayouts() & XSetup.LAYOUT_CLONE):
                self.xinerama = False
                for gfxcard in self.gfxcards:
                    gfxcard.setLayout(XSetup.LAYOUT_CLONE)
            else:
                self.xinerama = True
                for gfxcard in self.gfxcards:
                    gfxcard.setLayout(XSetup.LAYOUT_SINGLE_XINERAMA)
        
    def mayModifyLayout(self):


Generated by  Doxygen 1.6.0   Back to index