[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdebase/kicker/core
From:       Aaron J. Seigo <aseigo () kde ! org>
Date:       2004-12-01 0:23:32
Message-ID: 20041201002332.092A61B3F0 () office ! kde ! org
[Download RAW message or body]

CVS commit by aseigo: 

take into consideration xinerama windows when laying out panels


  M +17 -7     extensionmanager.cpp   1.42


--- kdebase/kicker/core/extensionmanager.cpp  #1.41:1.42
@@ -318,5 +318,5 @@ QRect ExtensionManager::workArea(int Xin
     }
 
-    //cout << "ExtensionManager::workArea(" << XineramaScreen << ", " << \
extension->winId() << ")" << endl; +    cout << "ExtensionManager::workArea(" << \
XineramaScreen << ", " << extension->winId() << ")" << endl;  QValueList<WId> list;
 
@@ -333,9 +333,12 @@ QRect ExtensionManager::workArea(int Xin
 
         // Rules of Exclusion:
-        // 0. Always exclude ourselves
-        // 1. Always exclude panels on the same side of the screen as ourselves that \
                are above us
-        // 2. Always exclude panels on adjacent sides of the screen that do not \
overlap with us +        // 0. Exclude ourselves
+        // 1. Exclude panels on the same side of the screen as ourselves that are \
above us +        // 2. Exclude panels on adjacent sides of the screen that do not \
overlap with us +        // 3. Exclude panels not on our Xinerama screen
 
-        if (m_mainPanel && extension == m_mainPanel)
+        if (m_mainPanel &&
+            (extension == m_mainPanel ||
+             m_mainPanel->xineramaScreen() != extension->xineramaScreen()))
         {
             //cout << "\t\texcluding m_mainPanel " << m_mainPanel->winId() << endl;
@@ -345,5 +348,12 @@ QRect ExtensionManager::workArea(int Xin
         for (; it != itEnd; ++it)
         {
-            if ((*it)->winId() == extension->winId())
+            //cout << "\txin screen: " << (*it)->xineramaScreen() << " != " << \
XineramaAllScreens << " != " << extension->xineramaScreen() << endl; +            if \
((*it)->xineramaScreen() != XineramaAllScreens && +                \
(*it)->xineramaScreen() != extension->xineramaScreen()) +            {
+                //cout << "\t\tRule 3 exclusion" << endl;
+                list.append((*it)->winId());
+            }
+            else if ((*it)->winId() == extension->winId())
             {
                 // Rule 0 Exclusion


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic