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

List:       kwin
Subject:    Re: [PATCH] Make TabBox raise selected window (NO effect)
From:       Thomas =?iso-8859-15?q?L=FCbking?= <thomas.luebking () web ! de>
Date:       2010-09-09 17:56:50
Message-ID: 201009091956.50657.thomas.luebking () web ! de
[Download RAW message or body]

Sorry for the delay.
Updated patch attached.

I took the opportunity to release the highlight setting from the tabbox (no 
strings changed or added), therefore added rootwindow property support to the 
highlight effect.
I hope i didn't miss any file in the patch (when does KDE move to git again?)

Am Saturday 28 August 2010 schrieb Martin Gräßlin:
> good point. So I have some comments to the patch:
>  * I think it should be side effect free. That is when the tabbox is closed
> with Escape it should return to the state as before.
check.

>  * It should only be used when compositing is not active 
check.
>  (maybe even combined with the highligh option?). 
check.

>  * I fear it will crash when a window is closed. You can
> easily test by middle clicking the items in the tabbox ;-)
Nope, the restack function digs for the window in the stacking order itself.
Since the stacking order has been updated, the window is gone.
(At least i wasn't able to make it segfault by the undetected feature to close 
windows by mbc)
The remaining "issue" is that the "highlighted" window is then either
- not restacked (if .succ is gone and therefore the hook to where it should be 
restacked)
- by a mega-tiny chance restacked to a wrong position (/theoretically/ it's 
possible that you close a window, open a new one and that get's the pointer of 
the lost one. if the lost one was one of the two involved you will "mess up" 
the stack on the next switch)

Ignoring the second case (for being "near" imposible) i wonder whether the 
first one is worth adding layer monitoring to the tabbox (to make it "correct" 
it should monitor all external restacks as well and update the .succ client 
respectively) or we'd argue that the stack was manipulated by the user anyway 
and one cannot say whether keeping or restacking the selected client would be 
the expected/"right" behaviour.
-> Opinions?

Cheers,
Thomas

["general_tabbox_highlight.diff" (text/x-patch)]

Index: tabbox.cpp
===================================================================
--- tabbox.cpp	(Revision 1171839)
+++ tabbox.cpp	(Arbeitskopie)
@@ -180,7 +180,19 @@
         }
     return ret;
     }
+    
+void TabBoxHandlerImpl::raiseClient( TabBoxClient* c ) const
+    {
+    Workspace::self()->raiseClient( static_cast<TabBoxClientImpl*>(c)->client() );
+    }
 
+void TabBoxHandlerImpl::restack( TabBoxClient *c, TabBoxClient *under )
+{
+    Workspace::self()->restack( static_cast<TabBoxClientImpl*>(c)->client(),
+                                static_cast<TabBoxClientImpl*>(under)->client() );
+}
+
+
 TabBoxClient* TabBoxHandlerImpl::desktopClient() const
     {
     foreach( const Client* client, Workspace::self()->stackingOrder() )
@@ -480,7 +492,7 @@
 /*!
   Notify effects that the tab box is being hidden.
 */
-void TabBox::hide()
+void TabBox::hide(bool abort)
     {
     delayedShowTimer.stop();
     if( m_isShown )
@@ -493,7 +505,7 @@
     if( isDisplayed())
         kDebug( 1212 ) << "Tab box was not properly closed by an effect";
     m_index = QModelIndex();
-    m_tabBox->hide();
+    m_tabBox->hide( abort );
     QApplication::syncX();
     XEvent otherEvent;
     while (XCheckTypedEvent (display(), EnterNotify, &otherEvent ) )
@@ -1096,7 +1108,7 @@
         if ( ((keyQt & ~Qt::KeyboardModifierMask) == Qt::Key_Escape)
             && !(forward || backward) )
             { // if Escape is part of the shortcut, don't cancel
-            closeTabBox();
+            closeTabBox( true );
             }
         else if( !(forward || backward) )
             {
@@ -1118,10 +1130,10 @@
         tab_box->unrefDisplay();
     }
 
-void Workspace::closeTabBox()
+void Workspace::closeTabBox( bool abort )
     {
     removeTabBoxGrab();
-    tab_box->hide();
+    tab_box->hide( abort );
     modalActionsSwitch( true );
     tab_grab = false;
     control_grab = false;
Index: tabbox.h
===================================================================
--- tabbox.h	(Revision 1171839)
+++ tabbox.h	(Arbeitskopie)
@@ -54,6 +54,8 @@
         virtual int nextDesktopFocusChain( int desktop ) const;
         virtual int numberOfDesktops() const;
         virtual TabBoxClientList stackingOrder() const;
+        virtual void raiseClient( TabBoxClient *client ) const;
+        virtual void restack( TabBoxClient *c, TabBoxClient *under );
         virtual TabBoxClient* clientToAddToList( TabBoxClient* client, int desktop, \
bool allDesktops ) const;  virtual TabBoxClient* desktopClient() const;
     };
@@ -102,7 +104,7 @@
         void nextPrev( bool next = true);
 
         void delayedShow();
-        void hide();
+        void hide( bool abort = false );
 
         void refDisplay();
         void unrefDisplay();
Index: workspace.h
===================================================================
--- workspace.h	(Revision 1171839)
+++ workspace.h	(Arbeitskopie)
@@ -157,6 +157,7 @@
         void raiseClientRequest( Client* c, NET::RequestSource src, Time timestamp \
                );
         void lowerClientRequest( Client* c, NET::RequestSource src, Time timestamp \
);  void restackClientUnderActive( Client* );
+        void restack( Client *c, Client *under );
         void updateClientLayer( Client* c );
         void raiseOrLowerClient( Client* );
         void restoreSessionStackingOrder( Client* c );
@@ -355,7 +356,7 @@
         int previousDesktopStatic( int iDesktop ) const;
         void refTabBox();
         void unrefTabBox();
-        void closeTabBox();
+        void closeTabBox( bool abort = false );
 
         // Tabbing
         void addClientGroup( ClientGroup* group );
Index: layers.cpp
===================================================================
--- layers.cpp	(Revision 1171839)
+++ layers.cpp	(Arbeitskopie)
@@ -456,21 +456,14 @@
         lowerClientWithinApplication( c );
     }
 
-void Workspace::restackClientUnderActive( Client* c )
+
+void Workspace::restack( Client* c, Client* under )
     {
-    if( c->isTopMenu())
-        return;
-    if( !active_client || active_client == c )
-        {
-        raiseClient( c );
-        return;
-        }
-
-    assert( unconstrained_stacking_order.contains( active_client ));
-    if( Client::belongToSameApplication( active_client, c ))
+    assert( unconstrained_stacking_order.contains( under ));
+    if( Client::belongToSameApplication( under, c ))
         { // put it below the active window if it's the same app
         unconstrained_stacking_order.removeAll( c );
-        unconstrained_stacking_order.insert( unconstrained_stacking_order.indexOf( \
active_client ), c ); +        unconstrained_stacking_order.insert( \
unconstrained_stacking_order.indexOf( under ), c );  }
     else
         { // put in the stacking order below _all_ windows belonging to the active \
application @@ -478,7 +471,7 @@
              it != unconstrained_stacking_order.end();
              ++it )
             { // TODO ignore topmenus?
-            if( Client::belongToSameApplication( active_client, *it ))
+            if( Client::belongToSameApplication( under, *it ))
                 {
                 if( *it != c )
                     {
@@ -494,12 +487,12 @@
          desktop <= numberOfDesktops();
          ++desktop )
         { // do for every virtual desktop to handle the case of onalldesktop windows
-        if( c->wantsTabFocus() && c->isOnDesktop( desktop ) && focus_chain[ desktop \
].contains( active_client )) +        if( c->wantsTabFocus() && c->isOnDesktop( \
desktop ) && focus_chain[ desktop ].contains( under ))  {
-            if( Client::belongToSameApplication( active_client, c ))
+            if( Client::belongToSameApplication( under, c ))
                 { // put it after the active window if it's the same app
                 focus_chain[ desktop ].removeAll( c );
-                focus_chain[ desktop ].insert( focus_chain[ desktop ].indexOf( \
active_client ), c ); +                focus_chain[ desktop ].insert( focus_chain[ \
desktop ].indexOf( under ), c );  }
             else
                 { // put it in focus_chain[currentDesktop()] after all windows \
belonging to the active applicationa @@ -508,7 +501,7 @@
                      i >= 0;
                      --i )
                     {
-                    if( Client::belongToSameApplication( active_client, focus_chain[ \
desktop ].at( i ))) +                    if( Client::belongToSameApplication( under, \
focus_chain[ desktop ].at( i )))  {
                         focus_chain[ desktop ].insert( i, c );
                         break;
@@ -518,12 +511,12 @@
             }
         }
     // the same for global_focus_chain
-    if( c->wantsTabFocus() && global_focus_chain.contains( active_client ))
+    if( c->wantsTabFocus() && global_focus_chain.contains( under ))
         {
-        if( Client::belongToSameApplication( active_client, c ))
+        if( Client::belongToSameApplication( under, c ))
             {
             global_focus_chain.removeAll( c );
-            global_focus_chain.insert( global_focus_chain.indexOf( active_client ), \
c ); +            global_focus_chain.insert( global_focus_chain.indexOf( under ), c \
);  }
         else
             {
@@ -532,7 +525,7 @@
                   i >= 0;
                   --i )
                 {
-                if( Client::belongToSameApplication( active_client, \
global_focus_chain.at( i ) )) +                if( Client::belongToSameApplication( \
under, global_focus_chain.at( i ) ))  {
                     global_focus_chain.insert( i, c );
                     break;
@@ -543,6 +536,18 @@
     updateStackingOrder();
     }
 
+void Workspace::restackClientUnderActive( Client* c )
+    {
+    if( c->isTopMenu())
+        return;
+    if( !active_client || active_client == c )
+        {
+        raiseClient( c );
+        return;
+        }
+    restack( c, active_client );
+    }
+    
 void Workspace::restoreSessionStackingOrder( Client* c )
     {
     if( c->sessionStackingOrder() < 0 )
Index: tabbox/tabboxhandler.cpp
===================================================================
--- tabbox/tabboxhandler.cpp	(Revision 1171839)
+++ tabbox/tabboxhandler.cpp	(Arbeitskopie)
@@ -39,6 +39,7 @@
 // KDE
 #include <KDebug>
 #include <KStandardDirs>
+#include <KWindowSystem>
 
 namespace KWin
 {
@@ -48,7 +49,7 @@
 class TabBoxHandlerPrivate
     {
     public:
-        TabBoxHandlerPrivate();
+        TabBoxHandlerPrivate( TabBoxHandler *q );
 
         ~TabBoxHandlerPrivate();
 
@@ -67,12 +68,13 @@
         /**
         * Ends window highlighting
         */
-        void endHighlightWindows();
+        void endHighlightWindows( bool abort = false );
 
         ClientModel* clientModel() const;
         DesktopModel* desktopModel() const;
         void parseConfig( const QString& fileName );
 
+        TabBoxHandler *q; // public pointer
         // members
         TabBoxConfig config;
         TabBoxView* view;
@@ -87,11 +89,15 @@
         */
         bool isShown;
         QMap< QString, ItemLayoutConfig > tabBoxLayouts;
+        TabBoxClient *lastRaisedClient, *lastRaisedClientSucc;
     };
 
-TabBoxHandlerPrivate::TabBoxHandlerPrivate()
+TabBoxHandlerPrivate::TabBoxHandlerPrivate( TabBoxHandler *q )
     {
+    this->q = q;
     isShown = false;
+    lastRaisedClient = 0;
+    lastRaisedClientSucc = 0;
     config = TabBoxConfig();
     view = new TabBoxView();
     XSetWindowAttributes attr;
@@ -230,11 +236,46 @@
     {
     if( !isShown || config.tabBoxMode() != TabBoxConfig::ClientTabBox )
         return;
-    QVector< WId > data( 2 );
+
     Display *dpy = QX11Info::display();
-    const WId wId = view->winId();
-    data[ 0 ] = wId;
-    data[ 1 ] = view->clientModel()->data( index, ClientModel::WIdRole \
).toULongLong(); +    TabBoxClient *currentClient = q->client( index );
+
+    if( !KWindowSystem::compositingActive() )
+        {
+        if( lastRaisedClient )
+            {
+                if ( lastRaisedClientSucc )
+                    q->restack( lastRaisedClient, lastRaisedClientSucc );
+//                 if ( lastRaisedClientWasMinimized )
+//                     lastRaisedClient->setMinimized( true );
+            }
+        
+        lastRaisedClient = currentClient;
+        if( lastRaisedClient )
+            {
+//             if ( (lastRaisedClientWasMinimized = lastRaisedClient->isMinimized()) \
) +//                 lastRaisedClient->setMinimized( false );
+            TabBoxClientList order = q->stackingOrder();
+            int succIdx = order.indexOf( lastRaisedClient ) + 1; // this is likely \
related to the index parameter?! +            lastRaisedClientSucc = ( succIdx < \
order.count() ) ? order.at( succIdx ) : 0; +            q->raiseClient( \
lastRaisedClient ); +            }
+        }
+
+    WId wId;
+    QVector< WId > data;
+    if ( config.isShowTabBox() )
+    {
+        wId = view->winId();
+        data.resize(2);
+        data[ 1 ] = wId;
+    }
+    else
+    {
+        wId = QX11Info::appRootWindow();
+        data.resize(1);
+    }
+    data[ 0 ] = currentClient ? currentClient->window() : 0L;
     if( config.isShowOutline() )
         {
         data.resize( 6 );
@@ -248,12 +289,16 @@
                     reinterpret_cast<unsigned char *>(data.data()), data.size());
     }
 
-void TabBoxHandlerPrivate::endHighlightWindows()
+void TabBoxHandlerPrivate::endHighlightWindows( bool abort )
     {
+    if ( abort && lastRaisedClient && lastRaisedClientSucc )
+        q->restack( lastRaisedClient, lastRaisedClientSucc );
+    lastRaisedClient = 0;
+    lastRaisedClientSucc = 0;
     // highlight windows
     Display *dpy = QX11Info::display();
     Atom atom = XInternAtom(dpy, "_KDE_WINDOW_HIGHLIGHT", False);
-    XDeleteProperty( dpy, view->winId(), atom );
+    XDeleteProperty( dpy, config.isShowTabBox() ? view->winId() : \
QX11Info::appRootWindow(), atom );  }
 
 /***********************************************************
@@ -411,7 +456,7 @@
     : QObject()
     {
     KWin::TabBox::tabBox = this;
-    d = new TabBoxHandlerPrivate;
+    d = new TabBoxHandlerPrivate( this );
     }
 
 TabBoxHandler::~TabBoxHandler()
@@ -448,6 +493,8 @@
 void TabBoxHandler::show()
     {
     d->isShown = true;
+    d->lastRaisedClient = 0;
+    d->lastRaisedClientSucc = 0;
     // show the outline
     if( d->config.isShowOutline() )
         {
@@ -457,19 +504,19 @@
         {
         d->view->show();
         d->view->updateGeometry();
-        if( d->config.isHighlightWindows() )
-            {
-            d->updateHighlightWindows();
-            }
         }
+    if( d->config.isHighlightWindows() )
+        {
+        d->updateHighlightWindows();
+        }
     }
 
-void TabBoxHandler::hide()
+void TabBoxHandler::hide( bool abort )
     {
     d->isShown = false;
     if( d->config.isHighlightWindows() )
         {
-        d->endHighlightWindows();
+        d->endHighlightWindows( abort );
         }
     if( d->config.isShowOutline() )
         {
@@ -577,7 +624,7 @@
             {
             d->updateOutline();
             }
-        if( d->config.isShowTabBox() && d->config.isHighlightWindows() )
+        if( d->config.isHighlightWindows() )
             {
             d->updateHighlightWindows();
             }
Index: tabbox/tabboxhandler.h
===================================================================
--- tabbox/tabboxhandler.h	(Revision 1171839)
+++ tabbox/tabboxhandler.h	(Arbeitskopie)
@@ -136,7 +136,19 @@
         * @return The next desktop in the current focus chain.
         */
         virtual int nextDesktopFocusChain( int desktop ) const = 0;
+        
         /**
+        * Raise a client (w/o activating it)
+        */
+        virtual void raiseClient( TabBoxClient* c ) const = 0;
+
+        /**
+         * @param c The client to be restacked
+         * @param under The client the other one will be placed below
+         */
+        virtual void restack( TabBoxClient *c, TabBoxClient *under ) = 0;
+        
+        /**
         * @return The current stacking order of TabBoxClients
         */
         virtual TabBoxClientList stackingOrder() const = 0;
@@ -191,7 +203,7 @@
         * Removes the outline if active.
         * @see show
         */
-        void hide();
+        void hide( bool abort = false );
 
         /**
         * Sets the current model index in the view and updates
Index: effects/highlightwindow/highlightwindow.cpp
===================================================================
--- effects/highlightwindow/highlightwindow.cpp	(Revision 1171839)
+++ effects/highlightwindow/highlightwindow.cpp	(Arbeitskopie)
@@ -129,10 +129,11 @@
 
 void HighlightWindowEffect::propertyNotify( EffectWindow* w, long a )
     {
-    if( !w || a != m_atom )
+    if( a != m_atom )
         return; // Not our atom
 
-    QByteArray byteData = w->readProperty( m_atom, m_atom, 32 );
+    QByteArray byteData = w ? w->readProperty( m_atom, m_atom, 32 ) :
+                              effects->readRootProperty( m_atom, m_atom, 32 );
     if( byteData.length() < 1 )
         { // Property was removed, clearing highlight
         finishHighlighting();
@@ -174,7 +175,8 @@
         return;
         }
     prepareHighlighting();
-    m_windowOpacity[w] = 1.0; // Because it's not in stackingOrder() yet
+    if( w )
+        m_windowOpacity[w] = 1.0; // Because it's not in stackingOrder() yet
 
     /* TODO: Finish thumbnails of offscreen windows, not sure if it's worth it \
though  if( !m_highlightedWindow->isOnCurrentDesktop() )
Index: kcmkwin/kwintabbox/main.ui
===================================================================
--- kcmkwin/kwintabbox/main.ui	(Revision 1171839)
+++ kcmkwin/kwintabbox/main.ui	(Arbeitskopie)
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>490</width>
-    <height>332</height>
+    <width>541</width>
+    <height>305</height>
    </rect>
   </property>
   <layout class="QVBoxLayout" name="verticalLayout">
@@ -19,187 +19,212 @@
     </widget>
    </item>
    <item>
-    <widget class="QGroupBox" name="groupBox">
-     <property name="title">
-      <string>General</string>
-     </property>
-     <layout class="QFormLayout" name="formLayout_2">
-      <property name="fieldGrowthPolicy">
-       <enum>QFormLayout::ExpandingFieldsGrow</enum>
-      </property>
-      <item row="0" column="0">
-       <widget class="QLabel" name="label_2">
+    <layout class="QFormLayout" name="formLayout">
+     <item row="0" column="0">
+      <widget class="QLabel" name="label_2">
+       <property name="text">
+        <string>List windows:</string>
+       </property>
+       <property name="buddy">
+        <cstring>listModeCombo</cstring>
+       </property>
+      </widget>
+     </item>
+     <item row="0" column="1">
+      <widget class="KComboBox" name="listModeCombo">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <item>
         <property name="text">
-         <string>List windows:</string>
+         <string>Current Desktop</string>
         </property>
-        <property name="buddy">
-         <cstring>listModeCombo</cstring>
+       </item>
+       <item>
+        <property name="text">
+         <string>All Desktops</string>
         </property>
-       </widget>
-      </item>
-      <item row="0" column="1">
-       <widget class="KComboBox" name="listModeCombo">
-        <property name="sizePolicy">
-         <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
-        </property>
-        <item>
-         <property name="text">
-          <string>Current Desktop</string>
-         </property>
-        </item>
-        <item>
-         <property name="text">
-          <string>All Desktops</string>
-         </property>
-        </item>
-        <item>
-         <property name="text">
-          <string>Current Desktop Grouped by Applications</string>
-         </property>
-        </item>
-        <item>
-         <property name="text">
-          <string>All Desktops Grouped by Applications</string>
-         </property>
-        </item>
-       </widget>
-      </item>
-      <item row="1" column="0">
-       <widget class="QLabel" name="label_8">
+       </item>
+       <item>
         <property name="text">
-         <string>Sort order:</string>
+         <string>Current Desktop Grouped by Applications</string>
         </property>
-        <property name="buddy">
-         <cstring>switchingModeCombo</cstring>
-        </property>
-       </widget>
-      </item>
-      <item row="1" column="1">
-       <widget class="KComboBox" name="switchingModeCombo">
-        <property name="sizePolicy">
-         <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
-        </property>
-        <item>
-         <property name="text">
-          <string>Recently used</string>
-         </property>
-        </item>
-        <item>
-         <property name="text">
-          <string>Stacking order</string>
-         </property>
-        </item>
-       </widget>
-      </item>
-      <item row="3" column="0" colspan="2">
-       <widget class="QCheckBox" name="showOutlineCheck">
+       </item>
+       <item>
         <property name="text">
-         <string>Show outline of selected window</string>
+         <string>All Desktops Grouped by Applications</string>
         </property>
-       </widget>
-      </item>
-      <item row="4" column="0">
-       <widget class="QLabel" name="label_7">
+       </item>
+      </widget>
+     </item>
+     <item row="1" column="0">
+      <widget class="QLabel" name="label_8">
+       <property name="text">
+        <string>Sort order:</string>
+       </property>
+       <property name="buddy">
+        <cstring>switchingModeCombo</cstring>
+       </property>
+      </widget>
+     </item>
+     <item row="1" column="1">
+      <widget class="KComboBox" name="switchingModeCombo">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <item>
         <property name="text">
-         <string>Effect:</string>
+         <string>Recently used</string>
         </property>
-        <property name="buddy">
-         <cstring>effectCombo</cstring>
-        </property>
-       </widget>
-      </item>
-      <item row="4" column="1">
-       <layout class="QHBoxLayout" name="horizontalLayout_2">
-        <item>
-         <widget class="KComboBox" name="effectCombo">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="toolTip">
-           <string>The effect to replace the list window when desktop effects are \
                active.</string>
-          </property>
-         </widget>
-        </item>
-        <item>
-         <widget class="KPushButton" name="effectConfigButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-         </widget>
-        </item>
-        <item>
-         <widget class="KPushButton" name="effectInfoButton"/>
-        </item>
-       </layout>
-      </item>
-      <item row="2" column="0" colspan="2">
-       <widget class="QCheckBox" name="showDesktopBox">
-        <property name="toolTip">
-         <string>Adds an entry to minimize all windows.</string>
-        </property>
+       </item>
+       <item>
         <property name="text">
-         <string>Include desktop</string>
+         <string>Stacking order</string>
         </property>
-       </widget>
-      </item>
-     </layout>
+       </item>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item>
+    <widget class="QCheckBox" name="showDesktopBox">
+     <property name="toolTip">
+      <string>Adds an entry to minimize all windows.</string>
+     </property>
+     <property name="text">
+      <string>Include desktop</string>
+     </property>
     </widget>
    </item>
    <item>
-    <widget class="QGroupBox" name="showTabBox">
-     <property name="title">
-      <string>Display list while switching</string>
+    <widget class="Line" name="line">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
      </property>
-     <property name="checkable">
-      <bool>true</bool>
+    </widget>
+   </item>
+   <item>
+    <widget class="QCheckBox" name="highlightWindowCheck">
+     <property name="toolTip">
+      <string>The currently selected window will be highlighted by fading out all \
other windows. This option requires desktop effects to be active.</string>  \
                </property>
-     <layout class="QGridLayout" name="gridLayout">
-      <item row="0" column="0" colspan="2">
-       <widget class="QCheckBox" name="highlightWindowCheck">
-        <property name="toolTip">
-         <string>The currently selected window will be highlighted by fading out all \
                other windows. This option requires desktop effects to be \
                active.</string>
-        </property>
-        <property name="text">
-         <string>Highlight selected window</string>
-        </property>
-       </widget>
-      </item>
-      <item row="1" column="0">
-       <widget class="KPushButton" name="layoutConfigButton">
-        <property name="text">
-         <string>Configure Layout...</string>
-        </property>
-       </widget>
-      </item>
-      <item row="1" column="1">
-       <spacer name="horizontalSpacer">
-        <property name="orientation">
-         <enum>Qt::Horizontal</enum>
-        </property>
-        <property name="sizeHint" stdset="0">
-         <size>
-          <width>40</width>
-          <height>20</height>
-         </size>
-        </property>
-       </spacer>
-      </item>
-     </layout>
+     <property name="text">
+      <string>Highlight selected window</string>
+     </property>
     </widget>
    </item>
    <item>
+    <widget class="QCheckBox" name="showOutlineCheck">
+     <property name="text">
+      <string>Show outline of selected window</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <layout class="QFormLayout" name="formLayout_2">
+     <item row="0" column="0">
+      <widget class="QLabel" name="label_7">
+       <property name="text">
+        <string>Effect:</string>
+       </property>
+       <property name="buddy">
+        <cstring>effectCombo</cstring>
+       </property>
+      </widget>
+     </item>
+     <item row="0" column="1">
+      <layout class="QHBoxLayout" name="horizontalLayout_2">
+       <item>
+        <widget class="KComboBox" name="effectCombo">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="toolTip">
+          <string>The effect to replace the list window when desktop effects are \
active.</string> +         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="KPushButton" name="effectConfigButton">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="KPushButton" name="effectInfoButton"/>
+       </item>
+      </layout>
+     </item>
+    </layout>
+   </item>
+   <item>
+    <widget class="Line" name="line_2">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <layout class="QHBoxLayout" name="horizontalLayout" stretch="0,1,0,2">
+     <item>
+      <widget class="QCheckBox" name="showTabBox">
+       <property name="text">
+        <string>Display list while switching</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <spacer name="horizontalSpacer_2">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="KPushButton" name="layoutConfigButton">
+       <property name="enabled">
+        <bool>false</bool>
+       </property>
+       <property name="text">
+        <string>Configure Layout...</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <spacer name="horizontalSpacer">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+    </layout>
+   </item>
+   <item>
     <spacer name="verticalSpacer">
      <property name="orientation">
       <enum>Qt::Vertical</enum>
@@ -238,9 +263,24 @@
   <tabstop>effectCombo</tabstop>
   <tabstop>effectConfigButton</tabstop>
   <tabstop>effectInfoButton</tabstop>
-  <tabstop>showTabBox</tabstop>
-  <tabstop>highlightWindowCheck</tabstop>
  </tabstops>
  <resources/>
- <connections/>
+ <connections>
+  <connection>
+   <sender>showTabBox</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>layoutConfigButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>81</x>
+     <y>211</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>295</x>
+     <y>216</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
 </ui>



_______________________________________________
kwin mailing list
kwin@kde.org
https://mail.kde.org/mailman/listinfo/kwin


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

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