Commit graph

62 commits

Author SHA1 Message Date
Lucas Murray
2bb64077e7 Don't allow windows to cast shadows on screens they are not on.
BUG: 176018

svn path=/trunk/KDE/kdebase/workspace/; revision=888665
2008-11-25 02:58:28 +00:00
Lucas Murray
37f7fdacfd Added support for decoration shadows in XRender mode.
Fixed memory leak where the default shadow textures were not being
deleted when shadows are reloaded.
Renamed a few OpenGL variables so they are not as confusing.

svn path=/trunk/KDE/kdebase/workspace/; revision=888449
2008-11-24 13:52:25 +00:00
Lucas Murray
fcb97626b0 Fix compiling error if OpenGL headers are unavailable. Patch by Simon St
James.

svn path=/trunk/KDE/kdebase/workspace/; revision=880985
2008-11-07 02:18:31 +00:00
Lucas Murray
6aad669e71 Clamp shadow textures, prevents faint lines from appearing around windows.
Reimplement default shadow colours.

svn path=/trunk/KDE/kdebase/workspace/; revision=878640
2008-11-01 14:41:42 +00:00
Lucas Murray
a7d883cc5d Make Oxygen not advertise support for shadow types that it does not yet.
Fallback to default shadows if the decoration doesn't support a certain type.

svn path=/trunk/KDE/kdebase/workspace/; revision=878627
2008-11-01 14:24:20 +00:00
Lucas Murray
41cb8b3c86 Draw queued shadows in window stacking order.
BUG: 172756

svn path=/trunk/KDE/kdebase/workspace/; revision=875189
2008-10-23 15:34:05 +00:00
Martin Gräßlin
78131acff8 Also honour zTranslate and RotationData in Shadow
svn path=/trunk/KDE/kdebase/workspace/; revision=875095
2008-10-23 10:16:07 +00:00
Lucas Murray
42d1a1fe6c Implement shadow brightness.
svn path=/trunk/KDE/kdebase/workspace/; revision=873488
2008-10-19 15:06:36 +00:00
Lucas Murray
154c19b0e7 Make the client shadowOpacity() return a relative opacity instead of absolute.
svn path=/trunk/KDE/kdebase/workspace/; revision=873440
2008-10-19 13:43:16 +00:00
Lucas Murray
c07ba30b63 Fixed shadow effect losing its shadows after making changes to the settings.
Added force mode to buildQuads() to allow refreshing the cache.
Made EffectWindow::buildQuads() no longer internal.

svn path=/trunk/KDE/kdebase/workspace/; revision=872836
2008-10-18 10:31:59 +00:00
Lucas Murray
b969ba71b7 Make the default shadow look like what it's supposed to.
svn path=/trunk/KDE/kdebase/workspace/; revision=872835
2008-10-18 10:31:51 +00:00
Lucas Murray
2672bd1ead Fixed texture coordinate direction.
svn path=/trunk/KDE/kdebase/workspace/; revision=872646
2008-10-17 18:18:06 +00:00
Lucas Murray
7597ce484e Prevent XRender mode from crashing when shadows are enabled.
svn path=/trunk/KDE/kdebase/workspace/; revision=872475
2008-10-17 10:30:58 +00:00
Lucas Murray
0442bcf1f7 Increment effect API version.
Added Martin and myself to the shadow effect copyright header.

svn path=/trunk/KDE/kdebase/workspace/; revision=872474
2008-10-17 10:30:52 +00:00
Lucas Murray
899d578c49 Merge Libkdecoration2 Git branch.
WARNING: Breaks shadow effect. I don't think it causes anything to crash anymore but it is VERY ugly visually.

Contains:
 - New decoration API that allows decorations to change the way shadows look.
 - Shadows now wobble.
 - API example code in the Oxygen decoration.
 - Added buildQuads() effect plugin hook.
 - Work on the shadow effect to use the new decoration shadow API as well.
 - Added IDs to WindowQuads.
 - Added public accessors to texture coords in WindowVertex.

Would like all this to be reviewed.

CCMAIL: kwin@kde.org

svn path=/trunk/KDE/kdebase/workspace/; revision=872473
2008-10-17 10:30:43 +00:00
Albert Astals Cid
882b909364 Add const & so we don't copy all that objects for nothing, faster effects for free!
svn path=/trunk/KDE/kdebase/workspace/; revision=869928
2008-10-11 12:38:46 +00:00
Luboš Luňák
1d2c54edcc Support for proper effect reconfiguration instead of reloading them.
Fixes e.g. the global animation combo not taking effect.


svn path=/trunk/KDE/kdebase/workspace/; revision=866903
2008-10-02 09:27:32 +00:00
Luboš Luňák
d0c1f5dd62 Disable shadow with effects that transform windows, such as wobbly,
since shadow currently can't handle that.
CCBUG: 161330


svn path=/trunk/KDE/kdebase/workspace/; revision=862309
2008-09-18 15:26:17 +00:00
Luboš Luňák
8e5f95a9d6 Make a more explicit distinction between using normalized and non-normalized
texture coordinates - it cost me hours to find out why something was misdrawing :(.


svn path=/trunk/KDE/kdebase/workspace/; revision=854546
2008-08-29 18:54:28 +00:00
Luboš Luňák
4fc3d50790 Properly #ifdef OpenGL-only and XRender-only stuff.
svn path=/trunk/KDE/kdebase/workspace/; revision=817585
2008-06-06 11:07:15 +00:00
Luboš Luňák
bc137cca3b Implement missing shadows in XRender mode, patch from Thomas Lübking.
BUG: 153144


svn path=/trunk/KDE/kdebase/workspace/; revision=817553
2008-06-06 09:26:41 +00:00
Luboš Luňák
75cd7922df Draw shadow for popups even if they have shape, they should be almost rectangular
anyway, so this is a workaround as long as there's no support for shadows for shaped windows.
BUG: 162697


svn path=/trunk/KDE/kdebase/workspace/; revision=817551
2008-06-06 09:20:01 +00:00
Cédric Borgese
6b391e1ed6 Fix memory leak.
svn path=/trunk/KDE/kdebase/workspace/; revision=810522
2008-05-20 22:04:12 +00:00
Albert Astals Cid
3b9121ec3f const & in foreach
svn path=/trunk/KDE/kdebase/workspace/; revision=801427
2008-04-26 16:03:02 +00:00
Louai Al-Khanji
340489c14a Better shadow color calculation. Picks up palette changes on the fly.
svn path=/trunk/KDE/kdebase/workspace/; revision=793031
2008-04-02 21:15:04 +00:00
Rivo Laks
9fa1b86285 Make shadow's color configurable and use color scheme for finding
the default value.
Patch by Louai Al-Khanji

svn path=/trunk/KDE/kdebase/workspace/; revision=784969
2008-03-12 22:12:55 +00:00
Luboš Luňák
cff2b0e6cd Abstract paint clipping into PaintClipper helper class that allows
stacking of clipping regions.
(http://lists.kde.org/?l=kwin&m=120138051215450&w=2)
BUG: 156798


svn path=/trunk/KDE/kdebase/workspace/; revision=779045
2008-02-25 11:32:21 +00:00
Luboš Luňák
34acf422ac Put transformWindowDamage() back.
BUG: 154714


svn path=/trunk/KDE/kdebase/workspace/; revision=756797
2008-01-03 19:51:22 +00:00
Luboš Luňák
bc5acf8268 Shaped shadows are not implemented yet, so disable shadows completely
for shaped windows.


svn path=/trunk/KDE/kdebase/workspace/; revision=756795
2008-01-03 19:39:18 +00:00
Rivo Laks
864dea425e Reworked shadow effect which should bring nice speedup (especially on cards where fill
rate is expensive).
It optimizes shadow rendering a lot by eliminating tons of overdraw:
- Windows are not forced to be drawn bottom-to-top anymore.
- For opaque windows, shadows are drawn only to where they will actually be visible, not
  under the whole window.

svn path=/trunk/KDE/kdebase/workspace/; revision=746296
2007-12-08 16:24:48 +00:00
Rivo Laks
e12e7ac6de I don't think this is necessary anymore
svn path=/trunk/KDE/kdebase/workspace/; revision=742682
2007-11-28 15:40:59 +00:00
Luboš Luňák
01bf6cbb4c License cleanup - add headers where missing, be explicit about GPL
being v2+ (right now it says just GPL, which according to GPL itself
means any GPL). Decoration clients will come later.
CCMAIL: kwin@kde.org


svn path=/trunk/KDE/kdebase/workspace/; revision=742302
2007-11-27 19:40:25 +00:00
Rivo Laks
85e31c0010 Reserve 80 items instead of creating them.
svn path=/trunk/KDE/kdebase/workspace/; revision=741041
2007-11-24 16:51:48 +00:00
Matt Rogers
462f588b25 Preallocate the size for the vectors based on the number of entries
that go into them. Saves quite a few memory reallocations in QVector.

Found by valgrind (via callgrind)


svn path=/trunk/KDE/kdebase/workspace/; revision=740992
2007-11-24 15:14:43 +00:00
Rivo Laks
b070bc842b Add repaint when window is closed.
Fixes shadows left on desktop when kickoff or app menus are closed

svn path=/trunk/KDE/kdebase/workspace/; revision=732268
2007-11-03 11:35:39 +00:00
Rivo Laks
5bb6ed0b1a Use new shadow texture by pinotree. It uses gaussian blur instead of linear falloff
and thus looks better.
Also change default shadow settings to look better with the new texture.

svn path=/trunk/KDE/kdebase/workspace/; revision=732038
2007-11-02 15:33:46 +00:00
Luboš Luňák
2922ef272e Don't cause painting in unrelated parts.
svn path=/trunk/KDE/kdebase/workspace/; revision=728509
2007-10-23 14:20:37 +00:00
Luboš Luňák
211bbc95ba Consistently decide whether shadow will be painted for a window.
svn path=/trunk/KDE/kdebase/workspace/; revision=728484
2007-10-23 12:40:03 +00:00
Rivo Laks
99cdfe7f8d Better defaults IMHO.
Now each side of the window is surrounded by a bit the of shadow while it's still bigger
  at the right side and the bottom.

svn path=/trunk/KDE/kdebase/workspace/; revision=718310
2007-09-28 12:50:36 +00:00
Rivo Laks
8d316461c4 Fix shadow's size
svn path=/trunk/KDE/kdebase/workspace/; revision=718307
2007-09-28 12:47:37 +00:00
Rivo Laks
0e1cb2a603 Add option to make active window's shadow stronger (on by default).
svn path=/trunk/KDE/kdebase/workspace/; revision=718304
2007-09-28 12:43:51 +00:00
Rivo Laks
3c195c505d Make it possible to increase shadow's size
svn path=/trunk/KDE/kdebase/workspace/; revision=718296
2007-09-28 12:24:11 +00:00
Luboš Luňák
e6069e9cf6 Arghl. Again a stupid bug caused by float having poor precision.
Reverting r700026 and changing floats to doubles again. I'd probably like
to change even the ones interfacing with OpenGL which I've left for now.


svn path=/trunk/KDE/kdebase/workspace/; revision=707987
2007-09-03 15:00:43 +00:00
Rivo Laks
00a10f732b Don't use shadow for desktop and docks
svn path=/trunk/KDE/kdebase/workspace/; revision=704304
2007-08-24 15:25:54 +00:00
Luboš Luňák
5faa397849 Vertex redesign - redo the way windows are split into smaller parts
for use in effects (and not only). Now a list of window quads (=window areas)
is created at the beginning of the paint pass, prepaint calls can modify
the split itself (i.e. divide it into more parts). The actual paint calls
can then modify these quads (i.e. transform their geometry). This will allow
better control of how the split is done and also allow painting e.g. only
the decoration differently. Still work in progress, but it works.
Also pass data to prepaint functions in a struct, as there is
already quite a number of them.


svn path=/trunk/KDE/kdebase/workspace/; revision=684893
2007-07-07 14:01:32 +00:00
Rivo Laks
69ad089958 Give the shadow a minimum size (otherwise rounded corners will break)
svn path=/trunk/KDE/kdebase/workspace/; revision=683444
2007-07-04 18:24:54 +00:00
Rivo Laks
bad6237218 - Implement textured shadows.
The default texture gives you nice rounded corners, but it can be changed to do something more fancy ;-)
- Fix a shadow transformation/rendering problem

svn path=/trunk/KDE/kdebase/workspace/; revision=683210
2007-07-04 11:39:30 +00:00
Rivo Laks
b5bc926a2e Bump default shadow offset from 5 to 10
svn path=/trunk/KDE/kdebase/workspace/; revision=675491
2007-06-14 11:04:13 +00:00
Rivo Laks
7812443973 Add soft shadows
svn path=/trunk/KDE/kdebase/workspace/; revision=675488
2007-06-14 11:00:22 +00:00
Rivo Laks
424f906ab2 - Add optional color argument to renderGLGeometry() functions. If specified, it's used as vertex colors
array when rendering.
- Rearrange some renderGLGeometry() parameters.
- Don't use opengl arrays and glDrawArrays() when rendering a small number of vertices since in this
  case overhead of enabling/disabling the array is too big. Use immediate mode instead in such case.

svn path=/trunk/KDE/kdebase/workspace/; revision=675467
2007-06-14 10:05:51 +00:00