DCOP interface for kwin (patch)

Various KDE 1.-4. Improvements

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

Available as/for: -

I implemented a DCOP interface for Kwin. This interface is asked by many users (wish #34882)

Exemples of use:
- This interface has created especialy for KHotKeys use. I give an exemple file for KHotKeys. With with interface, you can control mostly kwin with KGestures (really fun!).
- You can improve greatly kwin. Wish #103608 (Allowing suspend current window) can be implemented:
kill -STOP `dcop kwin Windows getPid 0`
and restart with
kill -CONT `dcop kwin Windows getPid 0`

I work on 3.4.3 version of kdebase from experimental packages of Debian (deb http://ftp.de.debian.org/debian ../project/experimental main). You shouldn't have problems to use this patch with most of other versions.

If you have some ideas about fonctions would usefull, I am open.

I dump functions list here:
$ dcop kwin
KWinInterface (default)
$ dcop kwin Cursor
QCStringList interfaces()
QCStringList functions()
QPoint getCursorPos()
void moveCursorRel(QPoint value)
void moveCursorAbs(QPoint value)
$ dcop kwin Windows
QCStringList interfaces()
QCStringList functions()
unsigned long int getCurWinId()
void setFocus(unsigned long int winId)
int getDesktop(unsigned long int winId)
void setDesktop(int value,int dir,unsigned long int winId)
bool isSticky(unsigned long int winId)
void setSticky(int status,unsigned long int winId)
QPoint getPosition(unsigned long int winId)
void setPosAbs(QPoint pos,unsigned long int winId)
void setPosRel(QPoint pos,unsigned long int winId)
void setPosInteractive(unsigned long int winId)
QRect getGeometry(unsigned long int winId)
QSize getSize(unsigned long int winId)
void setSizeAbs(QSize size,unsigned long int winId)
void setSizeRel(QRect size,unsigned long int winId)
void setSizeInteractive(unsigned long int winId)
QPixmap getSnapshot(unsigned long int winId)
QPixmap getIcon(unsigned long int winId)
QPixmap getMiniIcon(unsigned long int winId)
void setShortcut(QString sc,unsigned long int winId)
void setShortcutInteractive(unsigned long int winId)
uint getPid(unsigned long int winId)
bool isRaised(unsigned long int winId)
void raiseOrLower(int status,unsigned long int winId)
int getKeepLayoutSetting(unsigned long int winId)
void setKeepAbove(int status,unsigned long int winId)
void setKeepBelow(int status,unsigned long int winId)
bool isSkipTaskbar(unsigned long int winId)
void setSkipTaskbar(int status,unsigned long int winId)
bool isSkipPager(unsigned long int winId)
void setSkipPager(int status,unsigned long int winId)
unsigned int getState(unsigned long int winId)
void setState(unsigned int status,unsigned long int winId)
bool isMinimized(unsigned long int winId)
void setMinimized(int status,unsigned long int winId)
bool isMaximized(unsigned long int winId)
void setMaximized(int status,unsigned long int winId)
bool isFullscreen(unsigned long int winId)
void setFullscreen(int status,unsigned long int winId)
bool isShaded(unsigned long int winId)
void setShaded(int status,unsigned long int winId)
bool isBorderless(unsigned long int winId)
void setBorderless(int status,unsigned long int winId)
void close(unsigned long int winId)
void kill(unsigned long int winId)
void killInteractive()
$ dcop kwin Desktops
QCStringList interfaces()
QCStringList functions()
int getCurDesktopId()
QString getDesktopName(int deskId)
void gotoDesktopRel(int value,int dir)
int getDesktopRel(int value,int direction,int deskId)
QPixmap getSnapshot()
QValueList getWindowsList(int deskId)
QValueList getAllWindowsList()

If you you want specify current window or current desktop, give 0 as argument.
Signification of "direction" argument (I know, it should be an enum, but, it seems to break DCOP) :
0 = Absolute
1 = Linear (equivalent of Next/Previous)
2 = Horizontal (equivalent of Right/Left)
3 = Vertical (equivalent of Up/Down)
If you problem with negative number in QPoint, QRect, QSize, etc... using dcop command, see #117292


13 years ago

I have updated this diff for kdebase_3.5.8 and made a debdiff for Ubuntu 7.10 at:
However I found that this didn't do the one thing I wanted, which was to raise windows. I later discovered I could simply use "wmctrl -R <window title>"


Be the first to comment
File (click to download) Version Description PackagetypeArchitecture Downloads Date Filesize DL OCS-Install MD5SUM
*Needs pling-store or ocs-url to install things
0 Affiliates
updated Dec 02 2005
added Dec 02 2005
downloads 24h
mediaviews 24h 0
pageviews 24h 0