kwin/clients/PORTING
Luboš Luňák 0ba12a0837 Perform whole new window managing with X server grab, in order to prevent
"smart" apps from doing stupid things before they get MapNotify.
This avoids the recent Java+OracleInstaller strange problem too.
The patch may look huge, but it's only adding two KWin wrappers
for X(Un)GrabServer() and uncommenting the calls in Client::manage().

svn path=/trunk/kdebase/kwin/; revision=271152
2003-12-04 13:54:10 +00:00

40 lines
2.5 KiB
Text

Just a checklist for now, maybe a full HOWTO later.
porting:
- note that decorations are ported from HEAD, not from the branch - HEAD may have fixes that are not in the branch
- Makefile.am - LDFLAGS, LIBADD, kwin_ -> kwin3_, if in kdebase, add INCLUDES for libkdecorations before $(all_includes)
- .desktop - kwin_ -> kwin3_
- KWinButton -> QButton + QToolTip
- #include qbutton.h, kdecoration.h, kdecorationfactory.h
- Client* -> MyClient* in button class, pass parent->widget() to QButton
- inherit from KDecoration instead of Client
- no internal kwin #include, no namespace KWinInternal
- ctor takes KDecorationBridge* and KDecorationFactory*
- WResizeNoErase atd -> pass to createMainWidget()
- ctor is empty, all initialization done in init()
- createMainWidget() as the fist thing in init(), and widget()->installEventFilter( this )
- implement eventFilter()
- maximize changes - to flip a value, use maximize( maximizeMode() ^ XYZ ), for full maximize flip
use maximizeMode() == MaximizeFull ? maximize( MaximizeRestore ) : maximize( MaximizeFull )
- Sticky -> OnAllDesktops
- iconify -> minimize
- ther's no signal resetClients(), use KDecorationFactory::reset(), KDecorationFactory::resetDecorations(), KDecoration::reset()
- often this -> widget() , or prepend widget()-> , sometimes it may be handy to create wrapper functions for e.g. width()
- layout is created in init(), so call createLayout() directly there (if it's implemented)
- options -> options()
- no calls to Client::XYZ()
- titlebarDblClickOperation() for doubleclick on titlebar
- use extern "C" create_factory() returning your KDecorationFactory
- init(), deinit(), reset(), create()/allocate() -> KDecorationFactory
- reset() - instead of resetAllClients() return true, use argument for change detection, use resetDecorations()
for reseting decorations if not requesting recreating of decoration by returning true
- activeChange(bool) -> activeChange() + isActive(), etc.
- minimumSize()
- borders()
- contextHelp() -> showContextHelp()
- color setting values - prepend Color
- windowWrapperShowEvent() is gone
- animateIconifyOrDeiconify() -> animateMinimize() - just drop it if it's empty
- pay special attention to SLOT() names and cases where you need to use 'widget()' instead of 'this'
- buttons should use setCursor() if they don't want cursor set by mousePosition()
- X(un)GrabServer() -> (un)grabXServer()