Commit graph

14 commits

Author SHA1 Message Date
Martin Gräßlin
1d2c2d5982 Use Q_SLOTS and Q_SIGNALS instead of slots and signals
Fixes compilation with Qt5/KF5 setup.
2013-07-24 09:46:54 +02:00
Martin Gräßlin
98a04893a6 Use mgraesslin@kde.org for my mail address in Copyright and AboutData 2013-03-12 13:17:53 +01:00
Martin Gräßlin
b8c6831a1f Port Screenshot effect to XCB
This includes:
* getting cursor image through xcb_xfixes
* using xcb_image_get for reading screen content in xrender case
* using xcb_put_image to upload the generated screenshot into shared xpix

Overall this means that QPixmap as an X Pixmap wrapper is no longer used.
The conversion from xcb_image_t to QImage still needs some code for not
matching byte order. I'm a little bit unsure about adding the code as I
would not be able to test it.

REVIEW: 109076
2013-02-25 13:31:50 +01:00
Martin Gräßlin
b7f06b8708 Use window size for offscreen texture size in screenshot effect
Effect used the display size which caused windows being larger than
either width or height not to be captured correctly.

Now it uses the window size for the offscreen texture which also requires
to adjust the modelviewprojection matrix.

As an unrelated change the pointer to GLRenderTarget and GLTexture are
changed to a QScopedPointer and some variables which got moved around
are consted.

BUG: 312851
FIXED-IN: 4.11
REVIEW: 108258
2013-01-15 15:05:43 +01:00
Aleix Pol
73c142fe45 Extend the screenshot effect API.
Makes it possible to take a screenshot for a given window ID.

REVIEW: 104388
2012-04-12 13:13:49 +02:00
Martin Gräßlin
27643f5a9e Drop kephal dependency from KWin
Kephal has turned into not being more than a wrapper around
QDesktopWidget and does not even provide syntax sugar.

REVIEW: 104427
2012-04-01 08:11:57 +02:00
Martin Gräßlin
2007a7eab8 Use namespaced parameters in signals
Required to get scripting bindings working.
2012-03-12 21:37:40 +01:00
Thomas Lübking
0cbe297d84 sanitize closed screenshot windows, ignore deleted
CCBUG: 288271
REVIEW: 103350
2011-12-10 21:25:57 +01:00
Martin Gräßlin
fe4329a252 Only call active effects in the effect chain
Each effect is able to declare itself as currently being active,
that is transforming windows or painting or screen or doing anything
during the current rendered frame.

This change eliminates the hottest path inside KWin identified by
callgrind.

REVIEW: 102449
2011-08-29 07:06:58 +02:00
Martin Gräßlin
29e91f9042 Support for fullscreen, screen and region screenshot
Just to have something which uses the blitFramebuffer functionality.
2011-08-20 10:58:43 +02:00
Martin Gräßlin
b3a5639967 EffectsHandler and Effect become QObjects
This is in preparation for allowing to connect effects with signals and slots.
2011-02-25 20:25:21 +01:00
Martin Gräßlin
0a7e48f7aa KWin uses kdelibs coding style. 2011-01-31 20:07:03 +01:00
Martin Gräßlin
379e1a268b Screenshot effect provides hooks for KSnapshot.
This adds a DBus slot to capture a window and the pixmap handle
is passed back via a DBus signal.
Previous code using a shortcut and saving to filesystem is dropped
completely in favor for ksnapshot.
See http://reviewboard.kde.org/r/4814/

svn path=/trunk/KDE/kdebase/workspace/; revision=1175353
2010-09-14 19:52:44 +00:00
Martin Gräßlin
49fea7de58 New screenshot effect.
Saves an image of the active window into the home directory when triggered.
It uses an OpenGL FBO and by that can include the alpha channel and the decoration shadows.

svn path=/trunk/KDE/kdebase/workspace/; revision=1157682
2010-07-31 20:55:48 +00:00