From 99fa5f16ed844d33f956512ce943d8ec7b94c198 Mon Sep 17 00:00:00 2001 From: "Richard J. Moore" Date: Sun, 12 Nov 2000 20:25:21 +0000 Subject: [PATCH] Added a new method to the DCOP interface that displays the window menu for a specified WId. svn path=/trunk/kdebase/kwin/; revision=70680 --- KWinInterface.h | 1 + workspace.cpp | 12 ++++++++++++ workspace.h | 1 + 3 files changed, 14 insertions(+) diff --git a/KWinInterface.h b/KWinInterface.h index d0a73ecb5e..9cd1dd62a7 100644 --- a/KWinInterface.h +++ b/KWinInterface.h @@ -14,6 +14,7 @@ class KWinInterface : virtual public DCOPObject virtual ASYNC reconfigure() = 0; virtual ASYNC killWindow() = 0; virtual void doNotManage(QString)= 0; + virtual void showWindowMenuAt(unsigned long,int,int)= 0; }; diff --git a/workspace.cpp b/workspace.cpp index f4a764fcf2..74a3edb562 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -1177,6 +1177,18 @@ QPopupMenu* Workspace::clientPopup( Client* c ) return popup; } +void Workspace::showWindowMenuAt( unsigned long id, int x, int y ) +{ + Client *target = findClient( id ); + + if (!target) + return; + + QPopupMenu* p = clientPopup( target ); + p->setFocus(); + p->popup( QPoint( x, y ) ); +} + void Workspace::performWindowOperation( Client* c, Options::WindowOperation op ) { if ( !c ) return; diff --git a/workspace.h b/workspace.h index 03e9353cfb..d253a4547f 100644 --- a/workspace.h +++ b/workspace.h @@ -158,6 +158,7 @@ public: QPopupMenu* clientPopup( Client* ); + void showWindowMenuAt( unsigned long id, int x, int y ); void setDesktopClient( Client* );