Option for specifying Xinerama screen where new windows open.

FEATURE: 56827


svn path=/trunk/KDE/kdebase/workspace/; revision=662071
This commit is contained in:
Luboš Luňák 2007-05-07 12:27:19 +00:00
parent d510baf365
commit c0412fbf23
4 changed files with 13 additions and 3 deletions

View file

@ -62,6 +62,7 @@
<entry key="ShowDesktopIsMinimizeAll" type="Bool" /> <entry key="ShowDesktopIsMinimizeAll" type="Bool" />
<entry key="SeparateScreenFocus" type="Bool" /> <entry key="SeparateScreenFocus" type="Bool" />
<entry key="ActiveMouseScreen" type="Bool" /> <entry key="ActiveMouseScreen" type="Bool" />
<entry key="XineramaPlacementScreen" type="Int" />
</group> </group>
<group name="WM" > <group name="WM" >
<entry key="frame" type="Color" /> <entry key="frame" type="Color" />

View file

@ -202,9 +202,14 @@ bool Client::manage( Window w, bool isMapped )
if( isMapped || session ) if( isMapped || session )
area = workspace()->clientArea( FullArea, geom.center(), desktop()); area = workspace()->clientArea( FullArea, geom.center(), desktop());
else if( options->xineramaPlacementEnabled ) else if( options->xineramaPlacementEnabled )
area = workspace()->clientArea( PlacementArea, cursorPos(), desktop()); {
int screen = options->xineramaPlacementScreen;
if( screen == -1 ) // active screen
screen = workspace()->activeScreen();
area = workspace()->clientArea( PlacementArea, workspace()->screenGeometry( screen ).center(), desktop());
}
else else
area = workspace()->clientArea( PlacementArea, geom.center(), desktop()); area = workspace()->clientArea( PlacementArea, cursorPos(), desktop());
if( int type = checkFullScreenHack( geom )) if( int type = checkFullScreenHack( geom ))
{ {

View file

@ -103,9 +103,10 @@ unsigned long Options::updateSettings()
delete gc; delete gc;
placement = Placement::policyFromString( config.readEntry("Placement"), true ); placement = Placement::policyFromString( config.readEntry("Placement"), true );
xineramaPlacementScreen = qBound( -1, config.readEntry( "XineramaPlacementScreen", -1 ),
qApp->desktop()->numScreens() - 1 );
animateShade = config.readEntry("AnimateShade", true); animateShade = config.readEntry("AnimateShade", true);
animateMinimize = config.readEntry("AnimateMinimize", true); animateMinimize = config.readEntry("AnimateMinimize", true);
animateMinimizeSpeed = config.readEntry("AnimateMinimizeSpeed", 5 ); animateMinimizeSpeed = config.readEntry("AnimateMinimizeSpeed", 5 );

View file

@ -139,6 +139,9 @@ class Options : public KDecorationOptions
bool xineramaMaximizeEnabled; bool xineramaMaximizeEnabled;
bool xineramaFullscreenEnabled; bool xineramaFullscreenEnabled;
// number, or -1 = active screen (Workspace::activeScreen())
int xineramaPlacementScreen;
/** /**
MoveResizeMode, either Tranparent or Opaque. MoveResizeMode, either Tranparent or Opaque.
*/ */