Commit graph

43 commits

Author SHA1 Message Date
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
Rivo Laks
ea6f0ae502 - Effects' config module should link to kwineffects and shouldn't link to kutils.
- Make use of the two EffectHandler helper methods: effect config modules now notify KWin that
  corresponding effect should be reloaded when it's config is changed.

svn path=/trunk/KDE/kdebase/workspace/; revision=669436
2007-05-29 11:48:10 +00:00
Rivo Laks
c22b4809a5 Add working config modules for PresentWindows and Shadow effects.
You can configure shadow's offset and opacity and presentwindow's mouse activation areas
  (e.g. activate when mouse it at top-right corner).

svn path=/trunk/KDE/kdebase/workspace/; revision=669040
2007-05-28 11:34:12 +00:00
Rivo Laks
041673bf86 Effect's name in KWIN_EFFECT*() macros must now match effect's internal name in .desktop file,
without kwin4_effect_ prefix, so change the name in those macros to lowercase.
Some modifications to the macros themselves as well.

Effect loading via dcop might work again now.

svn path=/trunk/KDE/kdebase/workspace/; revision=669033
2007-05-28 11:16:18 +00:00
Luboš Luňák
f52b8e48cd branches/work/kwin_composite becomes new trunk kwin.
svn path=/trunk/KDE/kdebase/workspace/; revision=659202
2007-04-29 17:35:43 +00:00
Luboš Luňák
2b7e1f4993 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
2007-04-29 17:34:49 +00:00
Luboš Luňák
cd98bc12d5 Shared implementation of rendering gl geometry.
svn path=/branches/work/kwin_composite/; revision=656516
2007-04-21 16:02:19 +00:00
Luboš Luňák
04a3787213 Non-inline functions should be in .cpp .
svn path=/branches/work/kwin_composite/; revision=652257
2007-04-10 14:53:13 +00:00
Rivo Laks
0353f3376e Make effects actual plugins, so it's possible to load them on runtime.
There's also a kwineffects library now, containing the effects API, which makes it possible to write
  third-party effects.
API isn't complete yet and for now just two effects have been converted but I'm working on it :-)

svn path=/branches/work/kwin_composite/; revision=652226
2007-04-10 13:02:08 +00:00
Luboš Luňák
e3b865cd5f namespace KWinInternal -> KWin - shorter typing of names in gdb, yay
svn path=/branches/work/kwin_composite/; revision=650770
2007-04-05 12:07:35 +00:00
Rivo Laks
1f167d8d15 Add EffectWindow::isDeleted() method.
Don't draw shadow for deleted windows.

svn path=/branches/work/kwin_composite/; revision=648149
2007-03-30 16:12:07 +00:00
Rivo Laks
64051d3cf8 Honor window transformations when drawing the shadow.
This makes the shadow effect play nice with e.g. MinimizeAnimation or Expose

svn path=/branches/work/kwin_composite/; revision=647821
2007-03-29 15:52:20 +00:00
Luboš Luňák
8b5b40e4e8 Shadows. Right not it's only flat black rectangle, but otherwise
everything should work.


svn path=/branches/work/kwin_composite/; revision=646315
2007-03-25 10:48:07 +00:00