From 5d7ca8f2ee3511e2ea53ca5899d6d1bd9616ec19 Mon Sep 17 00:00:00 2001 From: Matthias Ettrich Date: Sun, 30 Jul 2000 16:15:17 +0000 Subject: [PATCH] adding missing raise and lower keybindings svn path=/trunk/kdebase/kwin/; revision=59304 --- kwinbindings.cpp | 2 ++ main.cpp | 14 +++++++------- workspace.cpp | 20 ++++++++++++++++++++ workspace.h | 8 +++++--- 4 files changed, 34 insertions(+), 10 deletions(-) diff --git a/kwinbindings.cpp b/kwinbindings.cpp index d56062ec46..a9ee051973 100644 --- a/kwinbindings.cpp +++ b/kwinbindings.cpp @@ -18,6 +18,8 @@ keys->insertItem(i18n("Window shade"),"Window shade", ""); keys->insertItem(i18n("Window move"),"Window move", ""); keys->insertItem(i18n("Window resize"),"Window resize", ""); + keys->insertItem(i18n("Window raise"),"Window raise", ""); + keys->insertItem(i18n("Window lower"),"Window lower", ""); keys->insertItem(i18n("Mouse emulation"),"Mouse emulation", "F12"); diff --git a/main.cpp b/main.cpp index 26d5e869ff..591682f0f8 100644 --- a/main.cpp +++ b/main.cpp @@ -23,11 +23,11 @@ Copyright (C) 1999, 2000 Matthias Ettrich #include #include #include -// #define INT8 _X11INT8 -// #define INT32 _X11INT32 +#define INT8 _X11INT8 +#define INT32 _X11INT32 #include -// #undef INT8 -// #undef INT32 +#undef INT8 +#undef INT32 #include #include @@ -46,7 +46,7 @@ static void crashHandler(int) { KCrash::setCrashHandler(0); // Exit on next crash. delete client; client = 0; // Unregister with dcop. -// system("kwin&"); // Try to restart + system("kwin&"); // Try to restart } int x11ErrorHandler(Display *d, XErrorEvent *e){ @@ -179,7 +179,7 @@ void Application::saveState( QSessionManager& sm ) sm.requestPhase2(); return; } - + workspaces.first()->storeSession( kapp->sessionConfig() ); kapp->sessionConfig()->sync(); } @@ -210,7 +210,7 @@ int main( int argc, char * argv[] ) signal(SIGHUP, SIG_IGN); Application a; -// KCrash::setCrashHandler(crashHandler); // Try to restart on crash + KCrash::setCrashHandler(crashHandler); // Try to restart on crash fcntl(ConnectionNumber(qt_xdisplay()), F_SETFD, 1); client = a.dcopClient(); diff --git a/workspace.cpp b/workspace.cpp index 65461d4721..80c660b45a 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -1957,6 +1957,8 @@ void Workspace::createKeybindings(){ keys->connectItem( "Window shade", this, SLOT( slotWindowShade() ) ); keys->connectItem( "Window move", this, SLOT( slotWindowMove() ) ); keys->connectItem( "Window resize", this, SLOT( slotWindowResize() ) ); + keys->connectItem( "Window raise", this, SLOT( slotWindowRaise() ) ); + keys->connectItem( "Window lower", this, SLOT( slotWindowLower() ) ); keys->connectItem( "Mouse emulation", this, SLOT( slotMouseEmulation() ) ); @@ -2047,6 +2049,24 @@ void Workspace::slotWindowShade() performWindowOperation( popup_client, Options::ShadeOp ); } +/*! + Raises the popup client + */ +void Workspace::slotWindowRaise() +{ + if ( popup_client ) + raiseClient( popup_client ); +} + +/*! + Lowers the popup client + */ +void Workspace::slotWindowLower() +{ + if ( popup_client ) + lowerClient( popup_client ); +} + /*! Invokes keyboard mouse emulation diff --git a/workspace.h b/workspace.h index 1de9a8b082..3ba0049138 100644 --- a/workspace.h +++ b/workspace.h @@ -175,9 +175,9 @@ public: void unclutterDesktop(); void reconfigure(); void doNotManage(QString); - + QString desktopName( int desk ); - + bool isNotManaged( const QString& title ); public slots: @@ -199,6 +199,8 @@ public slots: void slotWindowMaximizeHorizontal(); void slotWindowIconify(); void slotWindowShade(); + void slotWindowRaise(); + void slotWindowLower(); void slotWindowOperations(); void slotWindowClose(); @@ -312,7 +314,7 @@ private: QWidget* supportWindow; QRect area; - + // swallowing QStringList doNotManageList; };