All pastes #795971 Raw Edit

Zeug

public text v1 · immutable
#795971 ·published 2007-11-24 17:07 UTC
rendered paste body
--- kwin/options.cpp.sav        2006-06-09 17:58:18.000000000 +0200
+++ kwin/options.cpp    2006-06-09 18:02:27.000000000 +0200
@@ -102,9 +102,10 @@ unsigned long Options::updateSettings()
     delete gc;

     placement = Placement::policyFromString( config->readEntry("Placement"), true );
+    xineramaPlacementScreen = KCLAMP( config->readNumEntry( "XineramaPlacementScreen", -1 ),
+        -1, qApp->desktop()->numScreens() - 1 );

     animateShade = config->readBoolEntry("AnimateShade", TRUE );
-
     animateMinimize = config->readBoolEntry("AnimateMinimize", TRUE );
     animateMinimizeSpeed = config->readNumEntry("AnimateMinimizeSpeed", 5 );

--- kwin/options.h.sav  2006-06-09 17:57:26.000000000 +0200
+++ kwin/options.h      2006-06-09 18:02:27.000000000 +0200
@@ -138,6 +138,9 @@ class Options : public KDecorationOption
         bool xineramaMovementEnabled;
         bool xineramaMaximizeEnabled;
         bool xineramaFullscreenEnabled;
+
+        // number, or -1 = active screen (Workspace::activeScreen())
+        int xineramaPlacementScreen;

         /**
            MoveResizeMode, either Tranparent or Opaque.
--- kwin/kwin.kcfg.sav  2006-06-09 18:22:06.000000000 +0200
+++ kwin/kwin.kcfg      2006-06-09 18:25:11.000000000 +0200
@@ -62,6 +62,7 @@
   <entry key="ShowDesktopIsMinimizeAll" type="Bool" />
   <entry key="SeparateScreenFocus" type="Bool" />
   <entry key="ActiveMouseScreen" type="Bool" />
+  <entry key="XineramaPlacementScreen" type="Int" />
  </group>
  <group name="WM" >
   <entry key="frame" type="Color" />
--- kwin/manage.cpp.sav 2006-06-09 17:56:08.000000000 +0200
+++ kwin/manage.cpp     2006-06-09 18:02:27.000000000 +0200
@@ -202,9 +202,14 @@ bool Client::manage( Window w, bool isMa
     if( isMapped || session )
         area = workspace()->clientArea( FullArea, geom.center(), desktop());
     else if( options->xineramaPlacementEnabled )
-        area = workspace()->clientArea( PlacementArea, QCursor::pos(), desktop());
+        {
+        int screen = options->xineramaPlacementScreen;
+        if( screen == -1 ) // active screen
+            screen = workspace()->activeScreen();
+        area = workspace()->clientArea( PlacementArea, workspace()->screenGeometry( screen ).center(), desktop());
+        }
     else
-        area = workspace()->clientArea( PlacementArea, geom.center(), desktop());
+        area = workspace()->clientArea( PlacementArea, QCursor::pos(), desktop());

     if( int type = checkFullScreenHack( geom ))
         {