summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMavridis Philippe <mavridisf@gmail.com>2023-12-07 16:26:47 +0200
committerMavridis Philippe <mavridisf@gmail.com>2023-12-21 19:55:30 +0200
commit6c067940724bd28124ad6230261be4840928dcc4 (patch)
treecc636878d448248f2db6c3f2c81eb6b9b973a4e5
parent8447a9a65c165b4ad998e5d80529174e6f73903d (diff)
downloadtdebase-6c067940724bd28124ad6230261be4840928dcc4.tar.gz
tdebase-6c067940724bd28124ad6230261be4840928dcc4.zip
TWin: Add DCOP method showWindowMenu(wid) for default menu position
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com> (cherry picked from commit ecd60bc6a5f5181bb5013bea114fae5d8efaab47)
-rw-r--r--twin/KWinInterface.h3
-rw-r--r--twin/useractions.cpp10
-rw-r--r--twin/workspace.h2
3 files changed, 13 insertions, 2 deletions
diff --git a/twin/KWinInterface.h b/twin/KWinInterface.h
index dbc132888..4eb7948fe 100644
--- a/twin/KWinInterface.h
+++ b/twin/KWinInterface.h
@@ -18,7 +18,8 @@ class KWinInterface : virtual public DCOPObject
virtual bool isResumeableWindowID(unsigned long winId) = 0;
virtual void refresh() = 0;
virtual void doNotManage(TQString)= 0;
- virtual void showWindowMenuAt(unsigned long winId, int x, int y)= 0;
+ virtual void showWindowMenuAt(unsigned long winId, int x, int y) = 0;
+ virtual void showWindowMenu(unsigned long winId) = 0;
virtual void kDestopResized() = 0;
virtual void setDesktopLayout(int orientation, int x, int y)= 0;
virtual bool setCurrentDesktop(int)= 0;
diff --git a/twin/useractions.cpp b/twin/useractions.cpp
index 1bcd2dafa..dd29025db 100644
--- a/twin/useractions.cpp
+++ b/twin/useractions.cpp
@@ -654,6 +654,16 @@ void Workspace::showWindowMenuAt( unsigned long window, int x, int y )
showWindowMenu( x, y, client );
}
+void Workspace::showWindowMenu( unsigned long window )
+ {
+ Client *client;
+ if ((client = findClient(WindowMatchPredicate((WId)window))))
+ {
+ TQPoint pos = client->pos() + client->clientPos();
+ showWindowMenu( pos, client );
+ }
+ }
+
void Workspace::slotActivateAttentionWindow()
{
if( attention_chain.count() > 0 )
diff --git a/twin/workspace.h b/twin/workspace.h
index 47ba7bb15..954ea5191 100644
--- a/twin/workspace.h
+++ b/twin/workspace.h
@@ -204,8 +204,8 @@ class Workspace : public TQObject, public KWinInterface, public KDecorationDefin
void windowToNextDesktop( Client* c );
void sendClientToScreen( Client* c, int screen );
- // KDE4 remove me - and it's also in the DCOP interface :(
void showWindowMenuAt( unsigned long id, int x, int y );
+ void showWindowMenu( unsigned long id );
void kDestopResized();
/**