From d4c5fd676a462feaefcc8b69a27e6ee6b9144b09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Fri, 6 May 2005 09:24:51 +0000 Subject: [PATCH] Show the desktop switch popupinfo also when using mouse, and whatever. BUG: 80698 svn path=/trunk/KDE/kdebase/kwin/; revision=409960 --- activation.cpp | 1 - layers.cpp | 1 - tabbox.cpp | 1 - useractions.cpp | 16 +--------------- workspace.cpp | 7 ++++--- 5 files changed, 5 insertions(+), 21 deletions(-) diff --git a/activation.cpp b/activation.cpp index 1863ddaeba..ef4c55281c 100644 --- a/activation.cpp +++ b/activation.cpp @@ -270,7 +270,6 @@ void Workspace::activateClient( Client* c, bool force ) ++block_focus; setCurrentDesktop( c->desktop() ); --block_focus; - // popupinfo->showInfo( desktopName(currentDesktop()) ); // AK - not sure } if( c->isMinimized()) c->unminimize(); diff --git a/layers.cpp b/layers.cpp index cc1158d8eb..cf7aa607e3 100644 --- a/layers.cpp +++ b/layers.cpp @@ -70,7 +70,6 @@ License. See the file "COPYING" for the exact licensing terms. #include "client.h" #include "workspace.h" #include "tabbox.h" -#include "popupinfo.h" #include "group.h" #include "rules.h" diff --git a/tabbox.cpp b/tabbox.cpp index a97fc6353b..6014c01962 100644 --- a/tabbox.cpp +++ b/tabbox.cpp @@ -1073,7 +1073,6 @@ void Workspace::tabBoxKeyRelease( const XKeyEvent& ev ) if ( tab_box->currentDesktop() != -1 ) { setCurrentDesktop( tab_box->currentDesktop() ); - // popupinfo->showInfo( desktopName(currentDesktop()) ); // AK - not sure } } } diff --git a/useractions.cpp b/useractions.cpp index 0bc3390ffe..0fecbbb728 100644 --- a/useractions.cpp +++ b/useractions.cpp @@ -34,7 +34,6 @@ License. See the file "COPYING" for the exact licensing terms. #include #include -#include "popupinfo.h" #include "killwindow.h" #include "tabbox.h" @@ -571,7 +570,6 @@ void Workspace::slotSwitchDesktopNext() } } setCurrentDesktop(d); - popupinfo->showInfo( desktopName(currentDesktop()) ); } void Workspace::slotSwitchDesktopPrevious() @@ -585,7 +583,6 @@ void Workspace::slotSwitchDesktopPrevious() return; } setCurrentDesktop(d); - popupinfo->showInfo( desktopName(currentDesktop()) ); } void Workspace::slotSwitchDesktopRight() @@ -594,7 +591,6 @@ void Workspace::slotSwitchDesktopRight() if( desktop == currentDesktop()) return; setCurrentDesktop( desktop ); - popupinfo->showInfo( desktopName(currentDesktop()) ); } void Workspace::slotSwitchDesktopLeft() @@ -603,7 +599,6 @@ void Workspace::slotSwitchDesktopLeft() if( desktop == currentDesktop()) return; setCurrentDesktop( desktop ); - popupinfo->showInfo( desktopName(currentDesktop()) ); } void Workspace::slotSwitchDesktopUp() @@ -612,7 +607,6 @@ void Workspace::slotSwitchDesktopUp() if( desktop == currentDesktop()) return; setCurrentDesktop( desktop ); - popupinfo->showInfo( desktopName(currentDesktop()) ); } void Workspace::slotSwitchDesktopDown() @@ -621,13 +615,11 @@ void Workspace::slotSwitchDesktopDown() if( desktop == currentDesktop()) return; setCurrentDesktop( desktop ); - popupinfo->showInfo( desktopName(currentDesktop()) ); } void Workspace::slotSwitchToDesktop( int i ) { setCurrentDesktop( i ); - popupinfo->showInfo( desktopName(currentDesktop()) ); } @@ -776,7 +768,6 @@ void Workspace::slotWindowToNextDesktop() setClientIsMoving( c ); setCurrentDesktop( d ); setClientIsMoving( NULL ); - popupinfo->showInfo( desktopName(currentDesktop()) ); } } @@ -795,7 +786,6 @@ void Workspace::slotWindowToPreviousDesktop() setClientIsMoving( c ); setCurrentDesktop( d ); setClientIsMoving( NULL ); - popupinfo->showInfo( desktopName(currentDesktop()) ); } } @@ -811,7 +801,6 @@ void Workspace::slotWindowToDesktopRight() setClientIsMoving( c ); setCurrentDesktop( d ); setClientIsMoving( NULL ); - popupinfo->showInfo( desktopName(currentDesktop()) ); } } @@ -827,7 +816,6 @@ void Workspace::slotWindowToDesktopLeft() setClientIsMoving( c ); setCurrentDesktop( d ); setClientIsMoving( NULL ); - popupinfo->showInfo( desktopName(currentDesktop()) ); } } @@ -843,7 +831,6 @@ void Workspace::slotWindowToDesktopUp() setClientIsMoving( c ); setCurrentDesktop( d ); setClientIsMoving( NULL ); - popupinfo->showInfo( desktopName(currentDesktop()) ); } } @@ -859,7 +846,6 @@ void Workspace::slotWindowToDesktopDown() setClientIsMoving( c ); setCurrentDesktop( d ); setClientIsMoving( NULL ); - popupinfo->showInfo( desktopName(currentDesktop()) ); } } @@ -942,7 +928,7 @@ void Workspace::showWindowMenu( const QRect &pos, Client* cl ) */ void Workspace::slotWindowClose() { - if ( tab_box->isVisible() || popupinfo->isVisible() ) + if ( tab_box->isVisible()) return; Client* c = active_popup_client ? active_popup_client : active_client; performWindowOperation( c, Options::CloseOp ); diff --git a/workspace.cpp b/workspace.cpp index 615fe86556..74a541afc8 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -1070,6 +1070,7 @@ bool Workspace::setCurrentDesktop( int new_desktop ) // TODO Q_ASSERT( block_stacking_updates == 0 ); // make sure stacking_order is up to date StackingUpdatesBlocker blocker( this ); + int old_desktop = current_desktop; if (new_desktop != current_desktop) { /* @@ -1080,7 +1081,6 @@ bool Workspace::setCurrentDesktop( int new_desktop ) ObscuringWindows obs_wins; - int old_desktop = current_desktop; current_desktop = new_desktop; // change the desktop (so that Client::updateVisibility() works) for ( ClientList::ConstIterator it = stacking_order.begin(); it != stacking_order.end(); ++it) @@ -1178,6 +1178,9 @@ bool Workspace::setCurrentDesktop( int new_desktop ) // for( uint i = 0; i < desktop_focus_chain.size(); i++ ) // s += QString::number(desktop_focus_chain[i]) + ", "; // kdDebug(1212) << s << "}\n"; + + if( old_desktop != 0 ) // not for the very first time + popupinfo->showInfo( desktopName(currentDesktop()) ); return true; } @@ -1186,7 +1189,6 @@ void Workspace::nextDesktop() { int desktop = currentDesktop() + 1; setCurrentDesktop(desktop > numberOfDesktops() ? 1 : desktop); - popupinfo->showInfo( desktopName(currentDesktop()) ); } // called only from DCOP @@ -1194,7 +1196,6 @@ void Workspace::previousDesktop() { int desktop = currentDesktop() - 1; setCurrentDesktop(desktop > 0 ? desktop : numberOfDesktops()); - popupinfo->showInfo( desktopName(currentDesktop()) ); } int Workspace::desktopToRight( int desktop ) const