Bug 56827 - Would like option to have all new windows open on primary Xinerama display
Summary: Would like option to have all new windows open on primary Xinerama display
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: xinerama (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Lubos Lunak
URL:
Keywords:
: 92004 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-04-04 05:27 UTC by Jason Keirstead
Modified: 2007-05-07 14:27 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Keirstead 2003-04-04 05:27:52 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources

I would like an option added to the KWin / XInerama config for the placement of new windows. Currently, new windows on an Xinerama enabled desktop appear on whichever display the mouse is in at the time. While this may be appropriate behaviour for some, it most certainly is not for me as mu secondary display is just that, "secondary", it is much smaller than my other display and only really used for IRC, as such I would much rather new windows always appear on my primary desktop. I suspect others would have this same preference. I think an option in the KCM showing the desktops and allowing you to select one for the "primary display" to have new windows open on would be ideal.
Comment 1 John Belmonte 2003-05-01 07:19:49 UTC
What you can do is disable xinerama.  When you want an application to be on the
secondary screen, set DISPLAY accordingly just for that app.  Example command:

    DISPLAY=0.1 myapp
Comment 2 Jason Keirstead 2003-11-22 01:13:40 UTC
This is no answer. Disabling Xinerama means my kicker is all over the place. Also, right-rocking the kicker onto the primary monitor is not possible. Windows popup in between monitors, Mplayer full screen is broken, etc etc...

You shouldn't need to disable Xinerama to do something as simple as "open all windows on this monitor unless I say otherwise".
Comment 3 George Staikos 2003-11-22 01:48:26 UTC
We've had options for this for ages.
Comment 4 Jason Keirstead 2003-11-24 15:28:00 UTC
Where is this option?

The only option in the Xinerama config which would be even remotely like this is "Show unmanaged windows on..".

But I don't only want to show unmanaged windows on monitor 1. I want to show ALL new windows on Monitor 1.

I don't want them following my mouse everywhere it's really annoying.
Comment 5 George Staikos 2003-11-24 15:32:32 UTC
Ah I understand.  I did have this at one time but I must have forgot to re-add it when I threw out my old kcmxinerama.
Comment 6 George Staikos 2003-11-24 15:33:02 UTC
3.2 feature
Comment 7 George Staikos 2003-11-24 15:33:35 UTC
Argh, 3.2 feature freeze prevents this for now
Comment 8 Jason Keirstead 2003-11-24 16:35:51 UTC
If this existed in the previous kcmxinerama won't not having it in 3.2 be a regression?
Comment 9 George Staikos 2003-11-24 16:37:06 UTC
Subject: Re:  Would like option to have all new windows open on primary Xinerama display

On Monday 24 November 2003 10:35, you wrote:
> ------- If this existed in the previous kcmxinerama won't not having it in
> 3.2 be a regression?

   It was never released - it was my local first attempt, which I junked and 
rewrote.

Comment 10 Jason Keirstead 2004-06-04 06:18:33 UTC
Since this was already coded before it seems, is there any way we can sneak support for it into 3.3?

Even if it was a hidden, manually adjustable KConfig setting it would satisfy me, as this is by far the biggest pet-peeve for me in all of KDE right now. This bug plagues me several times every day...

Comment 11 Lubos Lunak 2006-01-04 15:20:57 UTC
*** Bug 92004 has been marked as a duplicate of this bug. ***
Comment 12 Lubos Lunak 2006-06-10 14:50:04 UTC
See http://kde-apps.org/content/show.php?content=40586 .
Comment 13 Lubos Lunak 2007-05-07 14:27:25 UTC
SVN commit 662071 by lunakl:

Option for specifying Xinerama screen where new windows open.
FEATURE: 56827



 M  +1 -0      kwin.kcfg  
 M  +7 -2      manage.cpp  
 M  +2 -1      options.cpp  
 M  +3 -0      options.h  


--- trunk/KDE/kdebase/workspace/kwin/kwin.kcfg #662070:662071
@@ -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" />
--- trunk/KDE/kdebase/workspace/kwin/manage.cpp #662070:662071
@@ -202,9 +202,14 @@
     if( isMapped || session )
         area = workspace()->clientArea( FullArea, geom.center(), desktop());
     else if( options->xineramaPlacementEnabled )
+        {
+        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, cursorPos(), desktop());
-    else
-        area = workspace()->clientArea( PlacementArea, geom.center(), desktop());
 
     if( int type = checkFullScreenHack( geom ))
         {
--- trunk/KDE/kdebase/workspace/kwin/options.cpp #662070:662071
@@ -103,9 +103,10 @@
     delete gc;
 
     placement = Placement::policyFromString( config.readEntry("Placement"), true );
+    xineramaPlacementScreen = qBound( -1, config.readEntry( "XineramaPlacementScreen", -1 ),
+        qApp->desktop()->numScreens() - 1 );
 
     animateShade = config.readEntry("AnimateShade", true);
-
     animateMinimize = config.readEntry("AnimateMinimize", true);
     animateMinimizeSpeed = config.readEntry("AnimateMinimizeSpeed", 5 );
 
--- trunk/KDE/kdebase/workspace/kwin/options.h #662070:662071
@@ -138,6 +138,9 @@
         bool xineramaMovementEnabled;
         bool xineramaMaximizeEnabled;
         bool xineramaFullscreenEnabled;
+        
+        // number, or -1 = active screen (Workspace::activeScreen())
+        int xineramaPlacementScreen;
 
         /**
            MoveResizeMode, either Tranparent or Opaque.