HOWTO: KWin Window Manager Decorations

KDE 3.x Window Decorations

Source i (link to git-repo or to original if based on someone elses unmodified work):

Add the source-code for this project on opencode.net

1
Become a Fan
5.0

Description:
Here is my HOWTO for making native KWin decorations. This tutorial covers creating a native KWin decoration using C++/Qt, as opposed to using a pixmap engine like the IceWM deco.

Includes tutorial and complete working source code for a plain but functional decoration. Assumes familiarity with C++ and Qt.

Now there's no more excuses for not writing that decoration you always wished someone else would do!
Last changelog:

0.8 -
Add support for new buttons, KDE 3.3 API.

0.7 -
Fix minimum window size (78739)

0.6 -
Set the proper icons for window state when creating buttons, and document

0.5 -
Minor changes tracking the new 3.2 API

0.4 -
Minor changes from user feedback

0.3 -
Minor changes to 3.2 API

0.2 -
Updated and converted example decoration to KDE 3.2. The example code no longer builds or runs with KDE 3.1 or earlier.


Ratings & Comments

17 Comments

motyR

first off all i would like to say 10x alot about this wonderfull tutorial, i'am always surprized from the great variety of stuff to do with linux really amazing,and now i would like to ask what about kstyle themes tutorial r u going to write this one down or if u can point us all to agood tutorial this would be great. any way 10x alot man great stuff!!! peace!

Brandybuck

I've thought I might someday write a KStyle tutorial, but it would be about ten times the work of the KWin tutorial, because there's about ten times the stuff to cover. There's also other projects I need to work on. Ah, if only I had one extra hand, two extra brains, and three extra hours per day...

gurensan

This is missing both the configure script AND the admin directory. It cannot be built as is. At least, not by following the directions.

gurensan

You need to copy an existing admin directory from any kde source package. The INSTALL file doesn't say this, but should. That's how I missed it!

Brandybuck

This is a HOWTO and tutorial. Evertyhing besides the actual HOWTO document is considered to be a sample or example. Including the INSTALL file. I am sorry for the confusion.

somekool

great that you port your example to 3.2... but what about an howto that will explain how to port ours ? what do I have to change on mine to make it work in 3.2 ?

Brandybuck

There's already a KWin 3.1 to 3.2 porting guide! In the kdebase sources, look at kwin/clients/PORTING.

mobtek

thanks for this, I have been looking for some up to date documentation for this, good work.

BigRedFish

Excellent as usual. Thanks for both the tutorial, and for writing clear readable code to begin with. You really help lower the learning curve. After your tutorial folks should have a framework within which to start playing with masking and bitmaps and other cool stuff. Bravo.

WinterWolf

thanks a lot, this was really needed, and it was great. maybe you can get it on KDE.org. Also are there any theme or/and tehme engine creation tutuorials which aren't obsolete for KDE?

dbrownlees

The QT docs do a pretty good job of explaining styles under QT3 (and also KDE3, KStyle now being only a relatively thin wrapper over QStyle). The Style Overview (in the qt docs) gives a brief tutorial, and the QStyle reference details pretty much everything else (except dealing with KDE oddities, like kde toolbar widgets - other styles are a good place to look for how to deal with them).

trtmrt

I haven't looked at your manual yet but was glad to see it posted. Just the other day I was looking for something like this and wasn't able to find it anywhere on the web. Google or kde's site were not helpful. Thanks for speding the time to do this.

saltwater

I'd like to learn more about KDE programming in general, not just window borders. Is there a good tutorial or a book? How did you learn all of this? Thanks!

Brandybuck

How did I learn all this? First learn C++. There's a million ways to do this, but you need to actually start writing programs before it sinks in. Then you need to learn Qt. That's easy. Qt has some excellent documentation, and it's quite straightforward. As for KDE, think of it as "Qt++". Checkout http://developer.kde.org for lots of info.

manikchand

Many good books on KDE programming do exist and the best of all are from SuSE. However they are in German. try- http://www.susepress.de/de/katalog/index.html However some basic documentation styled books are too available but they are too old. try- http://www.kde.org/stuff/books.php

reks

seem to be concise and crisp. Something of this sort was indeed missing. But I still don't know C++. So, I won't create "that" theme and I continue to wish that someone else would do :-) Alright, jokes apart.. thanks for the write-up. It is really a useful thing to have.

Brandybuck

Not knowing C++ is no excuse! Go grab the excellent and free "Thinking in C++" by Bruce Eckel at http://mindview.net/Books/TICPP/ThinkingInCPP2e.html That theme in your head wants to get out :-)

Pling
0 Affiliates
Details
license
version 0.8
updated
added
downloads 24h 0
mediaviews 24h 0
pageviews 24h 1

More KDE 3.x Window Decorations from Brandybuck:

Grover
Brandybuck
last update date: 21 years ago

Score 5.0

Other KDE 3.x Window Decorations:

Vista/Black
bastlerjan
last update date: 18 years ago

Score 5.0

Example
chuliomartinez
last update date: 20 years ago

Score 5.0

Svg-Deco Gentoo Ebuild
trancelis
last update date: 20 years ago

Score 5.0

Ebuilds: Tinydeco & Flip-lite
pootie
last update date: 19 years ago

Score 5.0

KBL, KBML ,KBCL for Slackware
rufuseddy
last update date: 20 years ago

Score 5.0

kwin-activeheart for SuSE 9.0
lemmy04
last update date: 21 years ago

Score 5.0



System Tags