Commit 2b7e1f49 authored by Luboš Luňák's avatar Luboš Luňák
Browse files

Remove kwin, kwin_composite will become new trunk kwin, missing merges

from trunk will be merged in.

svn path=/trunk/KDE/kdebase/workspace/; revision=659200
parent b52cf90c
add_definitions (-DQT3_SUPPORT)
add_subdirectory( lib )
add_subdirectory( killer )
add_subdirectory( kcmkwin )
add_subdirectory( pics )
add_subdirectory( clients )
add_subdirectory( effects )
add_subdirectory( data )
configure_file(config-kwin.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kwin.h )
########### next target ###############
qt4_add_dbus_adaptor( kwin_KDEINIT_SRCS org.kde.KWin.xml workspace.h KWin::Workspace )
kde4_automoc(kwin ${kwin_KDEINIT_SRCS})
kde4_add_kdeinit_executable( kwin ${kwin_KDEINIT_SRCS})
target_link_libraries(kdeinit_kwin ${KDE4_KDEUI_LIBS} kdecorations kwineffects ${X11_LIBRARIES} ${QT_QT3SUPPORT_LIBRARY} )
target_link_libraries(kdeinit_kwin ${OPENGL_gl_LIBRARY})
# -ldl used by OpenGL code
target_link_libraries(kdeinit_kwin -ldl)
if (X11_Xrandr_FOUND)
target_link_libraries(kdeinit_kwin ${X11_Xrandr_LIB})
endif (X11_Xrandr_FOUND)
if (X11_Xcomposite_FOUND)
target_link_libraries(kdeinit_kwin ${X11_Xcomposite_LIB})
endif (X11_Xcomposite_FOUND)
if (X11_Xdamage_FOUND)
target_link_libraries(kdeinit_kwin ${X11_Xdamage_LIB})
endif (X11_Xdamage_FOUND)
if (X11_Xrender_FOUND)
target_link_libraries(kdeinit_kwin ${X11_Xrender_LIB})
endif (X11_Xrender_FOUND)
if (X11_Xfixes_FOUND)
target_link_libraries(kdeinit_kwin ${X11_Xfixes_LIB})
endif (X11_Xfixes_FOUND)
target_link_libraries( kwin kdeinit_kwin )
########### install files ###############
install( FILES kwin.notifyrc DESTINATION ${DATA_INSTALL_DIR}/kwin )
kde4_install_icons( ${ICON_INSTALL_DIR} )
W A R N I N G:
This document is a work in progress and is in no way complete or accurate!
Its current purpose is in aiding the KWin NetWM audit for a future KWin release.
NetWM Compliance Document:
Listed below are all the NetWM (or EWM) hints decided upon on
(as of version 1.3draft, Nov 27, 2002) and KWin's current level of
compliance with the spec. Some parts also involve the pager and clients which
this document will cater for as well where applicable.
If you modify the level of NetWM compliance (via modification of kwin/*,
kdecore/netwm.* or kdecore/kwin.* etc.), or notice any new hints that
were added after version 1.2, please modify this document appropriately.
Properties are ordered in the table in the order they are found in the
specification. To list any important notes regarding a property, just
add them as follows:
_NET_NUMBER_OF_DESKTOPS root window property done
| This property SHOULD be updated by the Window Manager to |
| indicate the number of virtual desktops. KWin DOES update this |
| property when the pager changes the number of desktops. |
If you have any questions regarding the specification, feel free to ask on the KWin
mailing list <>, or on the Window Manager Spec list <>.
-- Karol <>
compliance :
- = none,
/ = partial,
+ = complete,
* = KWin is compliant, but something else needs checking (e.g. Qt)
? = unknown
NETWM spec compliance (whole document):
version 1.2
+ 1.
+ 2.3. Feature not implemented.
+ 2.4. Feature not implemented.
+ 2.5.
+ 2. (rest of the section)
+ 3.1.
This property is complete in the sence that all implemented properties
are listed here.
CHECKME : check it's complete
/ 3.2.
The spec requires that _NET_CLIENT_LIST contains the windows in their
initial mapping order, which is currently not true for NET::Desktop
Note that xprop lists only first element in WINDOW type properties.
+ 3.3.
Note that KWin does not use the virtual root windows technique,
so it doesn't set _NET_VIRTUAL_ROOTS at all.
+ 3.4.
KWin doesn't implement large desktops, so it ignores
the message, and only sets the property to the screen size.
+ 3.5.
KWin doesn't implement viewports, so it correctly sets
the property to (0,0) pairs and ignores the message.
+ 3.6.
+ 3.7.
+ 3.8.
KWin currently extends the message a bit, with data.l[0] being 1 or 2,
meaning 'from application'/'from pager', and data.l[1] contains
timestamp. This is used for focus stealing prevention purposes, and
will be proposed for next version of the spec.
+ 3.9.
+ 3.10.
+ 3.11.
KWin doesn't use the virtual roots technique for creating virtual
desktops, so it doesn't set the property.
- 3.12.
- 3.13.
+ 4.1.
+ 4.2.
+ 4.3.
Due to implementation details KWin actually allows moving or resizing
by keyboard when requested to be done by mouse, and vice versa.
+ 5.1.
+ 5.2.
+ 5.3.
+ 5.4.
+ 5.5.
/ 5.6. The handling of _NET_WM_WINDOW_TYPE itself is correct and complete.
Supported window types: DESKTOP, DOCK, TOOLBAR, MENU, UTILITY,
UTILITY should get better placement.
TOOLBAR - many parts in KDE still treat this as "tool" window.
- should the decoration be shown for the toolbars?
KDE extensions:
_KDE_NET_WM_WINDOW_TYPE_TOPMENU - this is used for implementing
standalone menubars for applications. Only the menubar
that is transient for the currently active window will be shown.
See KMenuBar class in libkdeui for details.
_KDE_NET_WM_WINDOW_TYPE_OVERRIDE - this seems to mean "this window
should be borderless", but it's actually used also for other
things, like fullscreen windows. The plan is to get rid of this
flawed thing as soon as possible.
/ 5.7.
The handling of _NET_WM_STATE itself is correct and complete.
STICKY is not supported, because KWin doesn't implement viewports.
BELOW - in order to make 'allow windows to cover the panel' feature
in Kicker work KWin interprets this state a bit differently
for DOCK windows. While normal DOCK windows are in their
extra layer above normal windows, making them BELOW doesn't
move them below normal windows, but only to the same layer, so
that windows can hide Kicker, but Kicker can be also raised
above the windows. A bit hacky, but it's not really against
the spec, and I have no better idea.
KDE extensions:
_NET_WM_STATE_STAYS_ON_TOP - has the same meaning like ABOVE,
and is deprecated in favour of it; it lacks the _KDE prefix
* 5.8.
The handling of _NET_WM_ALLOWED_ACTIONS itself is correct and complete.
STICK is not supported, because KWin does not implement viewports.
Kicker etc. need to be updated.
+ 5.9.
* 5.10.
Property is not used in KWin.
Kicker needs to be checked.
* 5.11.
KWin's handling of the property is correct.
Qt should be checked.
+ 5.12.
- 5.13.
Property is not used in KWin, KWin never provides icons for iconified windows.
Kicker or its taskbar don't set it either. However, the property is flawed,
and should be replaced by manager selection or similar mechanism.
+ 6.1.
+ 6. (rest)
+ 7.4.
The urgency hint is mapped to the _NET_WM_DEMANDS_ATTENTION flag.
* 7.5.
Qt often sets maximum size smaller than minimum size. This seems to be caused
by delayed layout calculations.
* 7.6.
Kicker should be checked.
? 7.7.
+ 7. (rest of the section)
ICCCM spec compliance (whole document):
version 2.0
/ 1.2.3.
KWin uses KWIN_RUNNING atom that's missing the leading underscore.
Some parts of KDE perhaps may be missing the leading underscore.
/ 1.2.6.
Should be checked.
+ 1. (rest of the section)
+ 2.8. kmanagerselection.* in kdecore
+ 2. (rest of the section)
Not a KWin thing.
* - patch sent to TT to make QClipboard sufficiently compliant
+ 3.
Feature not supported, obsolete.
+ 4.1.1
+ 4.1.2 (intro)
Used as a fallback for _NET_WM_NAME.
Used as a fallback for _NET_WM_ICON_NAME.
? - PSize, PPosition, USize, UPosition
? - clients - Qt simply sets both
+ - PWinGravity - window geometry constraints have higher priority than gravity
/ - PBaseSize - PMinSize is not used as a fallback for size increments
+ - (the rest)
+ - input - see 4.1.7
+ - initial_state
+ - icon - feature not supported
+ - window_group
+ - urgency - mapped to _NET_WM_DEMANDS_ATTENTION
/ - it should be checked it's used correctly in Kicker etc.
/ - should be checked
NETWM section 7.3. is supported too, even though it's a slight ICCCM violation.
See 4.1.8.
+ - handled by Xlib call
Feature not supported ( - icons)
* 4.1.4 it should be checked Qt/KDE clients handle this properly
/ 4.1.5
This needs fixing.
+ 4.1.6
+ 4.1.7
- 4.1.8
KWin only installs colormap required by the active window.
- 4.1.9
Feature not supported, except for WM_ICON_NAME as a fallback for _NET_WM_ICON_NAME.
+ 4.1.10
+ 4.1.11
Window groups are only used for supporting NETWM section 7.3.
+ 4.2.5
/ 4.2.7
Qt doesn't set revert-to to Parent.
+ frozen clients may be XKill-ed upon a user request though
+ 4.3
? 4.4
+ 4. (rest of the section)
+ 5.3. not KWin related
+ 5. (rest of the section )
? 6.1. clients thing
? 6.2. clients thing - Qt perhaps should force rule 2.
+ 6.3.
? 6. (rest of the section)
+ 7. - no idea what it is, but it doesn't seem to be KWin related
+ 8.
KDE-specific extensions (for completeness):
Property Name Type
_KDE_WM_CHANGE_STATE root window message
_KDE_NET_SYSTEM_TRAY_WINDOWS root window property
_KDE_NET_WM_FRAME_STRUT window property
- Qt extension
- has no vendor prefix even though it's not part of the spec
- KDE extension
- has no vendor prefix even though it's not part of the spec
- deprecated in favor of _NET_WM_STATE_KEEP_ABOVE
- window type, makes the window borderless
- unclear semantics, used also for fullscreen windows
- deprecated in favor of other window types
This file describes how to set up kwin_composite. Note that since it is still
a work in progress, this file may possibly get out of date at times.
See file HACKING for details on developing KWin, including building
the kwin_composite branch.
See file COMPOSITE_TODO for a list of things that still need to be done.
See effects/howto.* for a HOWTO on writting effects.
See documentation in source (mainly in scene.cpp) for description
of the design of the compositing framework.
Using kwin_composite branch:
See the KDE trunk HOWTO at .
The simplest way to build the kwin_composite branch is to switch the trunk version
to the branch:
$ cd kdebase/workspace/kwin
$ svn info
(prints the repository URL, for example
$ svn switch
(i.e. replace trunk/KDE/kdebase/workspace/kwin with branches/work/kwin_composite)
$ make
(i.e. build and use it as usually)
After starting, KWin's debug output also says which compositing backend it uses, e.g.
"OpenGL compositing". If it does not, most probably your X is not configured properly.
Both 9xxx and 8xxx drivers work, only 9xxx drivers provide TFP (texture_from_pixmap)
You need in xorg.conf
Option "AddARGBGLXVisuals" "True"
in 'Section "Screen"' and also the XComposite extension enabled:
Section "Extensions"
Option "Composite" "Enable"
The radeon driver should work for R200 chips, it's worse with R300 chips.
TODO - fglrx - no idea
You need in xorg.conf the XComposite extension enabled:
Section "Extensions"
Option "Composite" "Enable"
Also using
Option "XaaNoOffscreenPixmaps" "true"
in 'Section "Screen"' may improve performance for non-TFP (texture_from_pixmap) modes.
For the TFP mode AIGLX needs to work. With AIGLX direct rendering should be be disabled
(see GLDirect below, with older than 7.2 "export LIBGL_ALWAYS_INDIRECT=1" before
running kwin may be necessary).
TODO - no idea. Possibly similar to ATI.
Configuration options:
All general configuration option are in group [Translucency] in kwinrc config file:
UseTranslucency=<true|false> - enables/disables compositing support
GLMode=<TFP|SHM|Fallback> - selects texture creating mode
RefreshRate=<number> - manually specified refresh rate, should be usually automatically detected
GLAlwaysRebind=<true|false> - may increase speed with some graphics cards
GLDirect=<true|false> - enables/disables direct rendering
GLVSync=<true|false> - enables/disables synchronizing with monitor refresh
Options are in group [EffectShowFps] in kwinrc config file:
Alpha=<number 0.0-1.0> - transparency
X=<number> - X position, negative is from the right edge, -10000 is exactly right edge
Y=<number> = Y position, the same like X
Which modules are enabled is currently set by config value Load in group [Effects] in kwinrc config file.
Effects are named like the class, without the Effect suffix (e.g. Load=ShowFps,Fade). There is
no depedency checking implemented yet.
This file lists TODO items for the compositing code.
See file COMPOSITE_HOWTO for setting up kwin_composite.
See file HACKING for details on developing KWin, including building
the kwin_composite branch.
See effects/howto.* for a HOWTO on writting effects.
See documentation in source (mainly in scene.cpp) for description
of the design of the compositing framework.
* = not done, will be either done by me, or should be at least discussed first with me
+ = not done, I don't plan on doing it that soon
- in other words, these should be the best ones for you if you want to help
! = like +, but they should be relatively simple
- in other words, these should be the best if you want to get started with the code
/ = work in progress
? = should it be done?
% = should be probably done later, during cleanups and preparations for being stable
General TODO
? alpha clear hack
+ - find out if it affects performance
+ - if yes, try to find a better way of solving the problem
! - since kompmgr has an option to make only the decoration transparent,
it should be possible to do the same here - if the window has alpha and a decoration
or if there should be only the decoration transparent, paint first the contents
and then the decoration - this should make it possible to paint the decoration
without the random alpha that is right now handled by the alpha hack
? wait for decoration repaints
- it is sometimes visible that the window contents are painted first and the decoration
only afterwards with a small delay
? - this has been already greatly improved by r632378, so it's maybe not worth it anymore
- maybe posted paint events need to be processed immediatelly, or maybe the compositing
code should not update the window until the decoration is finished painting
? Expose events for overlay window - is it necessary to track it, like with root window?
% paint throttling
- there's 5ms grace period per repaint to avoid overloading the system with just compositing
and not letting the system do anything else - check and evaluate
% support for new window types from the wm spec for compositing
- this will have to be done in Qt, kdecore and kwin
* handle properly stacking order of deleted windows for showing in effects
* handle properly deleted windows that reappear (windowReadded() function?)
/ consider using an extra class for representing deleted windows
- cleaning up Client/Unmanaged instances may still leave e.g. timers around if they're overlooked
- an extra class could copy some interesting data and "replace" the old instance
% during screensaving, do no let non-screensaver windows show above screensaver
- kdesktop_lock watches for such things and raises again, but there's a small gap
% nvidia drivers by default use fake refresh rates as a workaround for some X limitations
- see the DynamicTwinView section in nvidia README
- this makes KWin repaint at a different rate than it should
* handling of window pixmap for unmapped windows
- currently it's kept around after a window is unmapped
* - but it's still discarded on e.g. resize - how to solve this?
* - perhaps there should be an option not to unmap windows in order to always have live thumbnails
* - another option could be to unmap but quickly map when a live thumbnail is needed
* cursorPos() does not work reliably now (not from e.g. timers, it needs events), so it's disabled
* window grouping is not implemented for unmanaged windows (used e.g. by DimInactive)
% clean up and sort out shortcuts so that they don't conflict and make sense
- also make configurable etc.
/ Check/make it work with other gfx cards
? Xgl support
- Compiz itself doesn't work when compiled with the libGL from nvidia,
it ships its own and links against it
? - might be worth trying to use that libGL as well
- it may be just because of the special libGL, but when testing with Xgl
it even seemed non-conformant - none of the provided configs had
GLX_RENDER_TYPE with GLX_RGBA_BIT even though required by GLX
and other funny things. Indeed, it may be just me being still pretty
clueless about these things.
? - is there a good reason to support Xgl? With the 9625 nvidia drivers
it seems to work fine without them and there's AIGLX
+ AIGLX support
- kind of works, needs more work
+ - it needs indirect rendering, should be autodetected and disabled somehow
% - may require LIBGL_ALWAYS_INDIRECT set with older
/ GL_ARB_texture_rectangle vs GL_ARB_texture_non_power_of_two
% - works; bugs in tfp_mode with power_of_two textures
- ati (others?): power_of_two windows are drawn white unless non-tfp_mode
is forced in findTextureTarget()
? in SceneOpenGL::bindTexture() with tfp_mode, with some gfx cards it seems
to be faster to not short-circuit the texture binding when there's been
no damage
+ strict binding
- there is code to support strict binding as required by AIGLX, but it's disabled, because
copy_buffer in bindTexture() ensures strict binding as a side-effect
- since copy_buffer hack should be removed in the future, strict binding will need to be enabled then
% bindTexture() optimize copied areas
- right now bindTexture() updates every damaged area and resets the window damage
- it might make things faster to update only areas that need to be repainted
and keep the rest damaged until needed
% clipping optimization
- like XRender code has paintTransformedScreen(), avoid painting parts that are
obscured (makes a difference with many windows open)
+ shm mode needs support for more data formats than GL_BGRA in order to support e.g. 16bpp mode
% with current nvidia glXCreatePixmap in tfp mode fails with pixmaps 32x32 and smaller
+ vertices list (and possibly more things) should not be part of SceneOpenGL::Window
- otherwise drawWindow() used for thumbnails would use them too
- they should be probably part of WindowPaintData
XRender TODO
+ SceneXrender::Window::performPaint() doesn't use saturation
+ SceneXrender::Window::performPaint() doesn't use brightness
+ SceneXrender::paintTransformedScreen() doesn't handle properly extending of painted area
in window's pre-paint - see the transformedShape() comment
Effects framework TODO
* more notification functions for effects are needed
- currently there are only very few notification functions (windowAdded, windowActivated,...)
! - window state changes
? more
/ shadows
+ - right now is only a rectangle, probably needs some shape support
+ - right now is only a flat black color, probably should be improved
/ support for grabbing input
- during some more complicated effects, input (at least mouse) should be disabled,
because currently there is no way to do input redirection
? pre-paint pass should be done completely before the paint pass
- currently prePaintWindow() is done only after paintScreen() has already started,
which means that if an effect sets PAINT_WINDOW_TRANSFORMED it needs to set it
also in prePaintScreen()
* PAINT_DISABLED turning off from effects needs some improvement
- a window may have painting disabled for various reasons and their numbers may increase
over time
- so e.g. an effect showing minimized windows cannot simply turn off DISABLED
for minimized windows, because it may be disabled also for other reasons
- there should be some utility function that will be called by the effect
with arguments saying which disabled windows it wants enabled
+ EffectWindow should be completely opaque when kept as the only API for effects
- no inlines, etc.
+ API for tabbox for effects should be cleaned up
* check Scene::updateTimeDiff() - should the time be 0 or 1?
* DesktopGridEffect has somewhat broken stacking order while moving windows
- the window is in proper layer when on its desktop but on top of everything when moved
to another desktop, due to its desktop being painted later
- maybe there should be PAINT_WINDOW_TOP (_LAST or whatever) that'd make it painted always
on top of everything
% post calls are probably not necessary by now (
Effects TODO
+ adapt the kcontrol module used by Kompmgr
- in kcmkwin/kwinoptions
! - uses ~/.xcompmgr, convert to use normal KConfig
? - I don't think these effects should be plugins or anything like that,
probably simply write to kwinrc and use the Option class in KWin
/ implements all effects Kompmgr could do
+ - all effects from the Opacity tab should be already doable
! - applying translucency only to the decoration