Commit graph

72 commits

Author SHA1 Message Date
Lucas Murray
763d9d8c6f Previous shadow damage commit didn't catch 100% of the events. Lets just
do it the old way but taking into account the decoration shadow sizes.

svn path=/trunk/KDE/kdebase/workspace/; revision=896765
2008-12-14 12:43:16 +00:00
Lucas Murray
06aa24a750 Correctly damage the shadow area during repaint requests.
svn path=/trunk/KDE/kdebase/workspace/; revision=896705
2008-12-14 09:50:44 +00:00
Lucas Murray
94fd94aac1 Use the correct clamping function. Patch by Philip Falkner. Hopefully
fixes some ATI glitches.
CCBUG: 177118

svn path=/trunk/KDE/kdebase/workspace/; revision=896693
2008-12-14 08:46:11 +00:00
Lucas Murray
3e5651f086 Correct use of OpenGL coords. Fixes shadow issue with small windows that
have been subdivided in other effects such as wobbly windows.
BUG: 175754

svn path=/trunk/KDE/kdebase/workspace/; revision=896300
2008-12-13 06:51:57 +00:00
Lucas Murray
6d3f171ce5 Fix compiling when there is no XRender libraries.
svn path=/trunk/KDE/kdebase/workspace/; revision=890434
2008-11-29 11:08:53 +00:00
Wouter Becq
059e80c15e fix compile without opengl
svn path=/trunk/KDE/kdebase/workspace/; revision=890431
2008-11-29 10:58:14 +00:00
Lucas Murray
7269b928ea Fixed incorrect shadow opacities in OpenGL mode.
svn path=/trunk/KDE/kdebase/workspace/; revision=889944
2008-11-28 04:05:31 +00:00
Lucas Murray
117cb5719f Move repeated code into a helper function.
svn path=/trunk/KDE/kdebase/workspace/; revision=889733
2008-11-27 13:38:35 +00:00
Lucas Murray
e4d54bd4de Implement XRender shadow brightness.
svn path=/trunk/KDE/kdebase/workspace/; revision=889724
2008-11-27 13:20:26 +00:00
Lucas Murray
1a97abea6d Implement and activate shadow effect settings relating to default shadow
overrides.

svn path=/trunk/KDE/kdebase/workspace/; revision=888722
2008-11-25 09:10:52 +00:00
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