Commit Graph

389 Commits (ce674ed509301a6756bc9f1a8e946e9c21c4205d)

Author SHA1 Message Date
Aleix Pol 7b110f0671 Improve CMake usage
It's basically a run of the port-cmake.sh script in here, mostly the changes
are the following:
- Using KF5::* targets
- Using the proper macros, following recent developments in frameworks
2013-11-15 13:37:47 +01:00
David Faure 57ff76150e Fix cmake warnings due to LINK_INTERFACE_LIBRARIES, use PUBLIC/PRIVATE instead. 2013-11-10 20:45:23 +01:00
Martin Gräßlin e3618e8796 [kwin] Follow Qt's OpenGL choice for KWin
As KWin indirectly uses Qt's OpenGL through QtQuick we need to ensure
to not mix OpenGL and OpenGLES. So we have to built KWin only against
OpenGL if Qt is built against OpenGL and we have to built KWin only
against GLESv2 if Qt is built against GLESv2.

This means the kwin_gles binary is no more. There is only kwin which
either links GL or GLESv2.
2013-10-14 09:04:03 +02:00
Martin Gräßlin 969e6b85e7 Merge branch 'master' into frameworks-scratch
Conflicts:
	CMakeLists.txt
	kwin/client.cpp
	kwin/effects/highlightwindow/highlightwindow.cpp
	kwin/libkwineffects/kwingltexture.cpp
	kwin/libkwineffects/kwinxrenderutils.cpp
	kwin/scene_opengl.cpp
	kwin/workspace.cpp
	plasma/desktop/applets/kickoff/CMakeLists.txt
	plasma/desktop/applets/taskmanager/package/contents/code/tools.js
	plasma/desktop/applets/taskmanager/package/contents/ui/Task.qml
	plasma/desktop/applets/taskmanager/package/contents/ui/main.qml
	plasma/desktop/applets/taskmanager/package/metadata.desktop
	plasma/desktop/applets/taskmanager/plugin/textlabel.h
	plasma/desktop/applets/tasks/CMakeLists.txt
	plasma/desktop/applets/tasks/package/metadata.desktop
	plasma/desktop/applets/tasks/tasks.cpp
	plasma/desktop/toolboxes/plasma-toolbox-desktoptoolbox.desktop
	plasma/generic/applets/activitybar/activitybar.cpp
	plasma/generic/wallpapers/color/plasma-wallpaper-color.desktop
	plasma/generic/wallpapers/image/plasma-wallpaper-image.desktop
2013-09-24 11:28:38 +02:00
Thomas Lübking 3f5ef10c8e introduce GLTexture::clear and use it from paintredirector
also work around broken fbo texture clearing on fglrx

so far supports FBO/glClear and resorts to glTexSubImage2D

if the fbo cannot be created or is (in case of fglrx)
known to break, resort to glTexImage2D loading of an
argb array of zeros

BUG: 323065
FIXED-IN: 4.11.2
REVIEW: 112526
2013-09-24 00:50:55 +02:00
Alex Richardson 109c504ef7 fix mismatched struct/class forward declaration
Found by compiling with clang
2013-09-13 16:52:25 +02:00
Martin Gräßlin ff6cb5e75c Drop the GlobalShortcutsEditor from libkwineffects
As our need can be satisfied without sub-classing KShortcutsEditor
we can drop this class.
2013-09-09 07:10:08 +02:00
Martin Gräßlin caad13ff95 Use new components based Find XCB 2013-09-09 06:03:35 +02:00
Thomas Lübking 3859f67862 glsl is not supported on indirect contexts
and fglrx yells an invalid_enum error when being asked
for the version

BUG: 323527
FIXED-IN: 4.11.2
REVIEW: 112419
2013-09-08 23:43:04 +02:00
Martin Gräßlin 5e29cc24dc Remove XLib dependency from kwinglobals
As a side effect we need some fixx11h.h includes at places which still
use too much xlib.
2013-09-05 09:56:50 +02:00
Martin Gräßlin 8a78e71c97 Drop KWin::Extensions from kwinglobals
Replaced by KWin::Xcb::Extensions. This removes the remaining
Xlib extension dependencies form kwineffects.
2013-09-05 09:14:09 +02:00
Eike Hein fbc957c048 Second 'unbreak kwin build' of the day ...
Port from kFatal to qFatal - kFatal is still in kde4support,
but lacking debug area support arguably isn't that big a
deal since fatals can't be turned off anyway.

CCMAIL:mgraesslin@kde.org
2013-09-02 18:42:20 +02:00
Martin Gräßlin add219d5bc Port libkwinglutils from KDebug to QDebug
And another lib doesn't need kde4support any more.
2013-09-02 11:31:46 +02:00
Martin Gräßlin 99bcac1cc7 Port libkwineffects away from KDebug
And with that it doesn't need kde4support anymore.
2013-09-02 10:43:55 +02:00
Martin Gräßlin 16df417cc6 XCB variant for displayWidth/Height and update after RandR event
DisplayWidth and height provide proper values though internally
things are wrong as QDesktopWidget seems to not emit the signal.
2013-09-02 10:23:30 +02:00
Thomas Lübking 9001af8e5a reset custom cube shaders on screen change
the reset/setup invokes the viewport dimensions...

BUG: 323311
FIXED-IN: 4.11.1
REVIEW: 112133
2013-08-27 07:53:02 +02:00
Thomas Lübking 1d778f4600 c++ cannot invoke other constructors
BUG: 324004
FIXED-IN: 4.11.1
BUG: 112274
2013-08-25 17:05:37 +02:00
Martin Gräßlin 37334f400a Drop no longer needed XLib includes from KWin 2013-08-20 10:29:20 +02:00
Martin Gräßlin 84a2f3020b Use Qt5:: in target link libraries in KWin 2013-08-20 09:14:24 +02:00
Anselmo L. S. Melo 49c04f13b1 Porting libkwineffects to Qt5/KF5: QStandardPaths
REVIEW: 111976
2013-08-13 17:55:57 -03:00
Martin Gräßlin 388944314a Drop QPixmap ctor of XRenderPicture
Was a todo to remove it as it's just using a toImage. Removing this
ctor should make it for the user more obvious that put image is used.
2013-08-13 09:57:50 +02:00
Sebastian Kügler 08a53e6a11 Remove K_EXPORT_PLUGIN macros
Include .moc file in configs_builtins.cpp, and reenable the build of the
configs.

REVIEW:111940
2013-08-08 13:47:25 +02:00
Martin Gräßlin 9291b18cee Merge branch 'master' into frameworks-scratch
Conflicts:
	CMakeLists.txt
	kwin/effects.cpp
	kwin/effects/logout/logout.cpp
	kwin/effects/presentwindows/main.qml
	kwin/effects/presentwindows/presentwindows.cpp
	kwin/effects/presentwindows/presentwindows.h
	kwin/effects/zoom/zoom_config.cpp
	kwin/libkwineffects/kwinglutils_funcs.cpp
	kwin/libkwineffects/kwinxrenderutils.cpp
	kwin/nvidiahack.cpp
	kwin/xcbutils.h
	plasma/desktop/containments/desktop/plasma-containment-desktop.desktop
	plasma/generic/wallpapers/image/image.cpp
	plasma/generic/wallpapers/image/plasma-wallpaper-image.desktop
2013-08-07 10:10:06 +02:00
Thomas Lübking b92ebe02aa add synthetic repaint after crossfade finished
prevents glitches after crossfading translucent window

REVIEW: 111888
2013-08-06 09:12:05 +02:00
Thomas Lübking e9e73f1134 add XRenderPicture(QImage) constructor
was implicitly present for QPixmap::toImage

REVIEW: 111878
2013-08-05 20:43:28 +02:00
Martin Gräßlin 469828c847 Cache display and rootWindow
No need to go through the QPA interface each time we access the
Display variable or need the root window.
2013-08-02 08:31:53 +02:00
Martin Gräßlin 1807265813 KDebug moved to KDE4Support
Adjust target link libraries.
2013-07-31 14:07:58 +02:00
Casian Andrei 4d24fe8b30 Fix many color correction problems with OpenGL ES
On GLES, check for OES_texture_3D extension for color correction

Remove a block of ugly hack code that was supposedly needed to build
with OpenGL ES.

Convert the lookup texture data to uint8 on OpenGL ES before sending it
via glTexImage3D, because uint16 is not supported.

Check if the shaders have been reinitialized successfuly when trying to
activate color correction, prevent black screens when there are issues
with the shaders.

BUG: 315419
REVIEW: 111225
(cherry picked from commit 68c68ee3c2b54f968c4d8275f1e8a2e0ccc90dd7)
2013-07-28 17:44:06 +03:00
Martin Gräßlin 9ab751042a Drop X11_XCB library dependency
We don't need it anymore - the xcb connection is also provided by
QX11Info.
2013-07-24 09:58:43 +02:00
Martin Gräßlin 202bc2fbf9 Fix include path to QX11Info 2013-07-24 09:58:43 +02:00
Martin Gräßlin f04b39c548 Adjust target link libraries 2013-07-24 09:58:42 +02:00
Martin Gräßlin e32635fb2e QMatrix4x4 does no longer wrap qreal 2013-07-24 09:58:41 +02:00
Martin Gräßlin 330d40f425 Fix no cast to/from ASCII intrduced issues
* "" needs to be wrapped in QStringLiteral
* QString::fromUtf8 needed for const char* and QByteArray
* QByteArray::constData() needed to get to the const char*
2013-07-24 09:58:33 +02:00
Martin Gräßlin 8dd61fdc53 Introduce a define to mark code areas which need porting 2013-07-24 09:47:02 +02:00
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 2f9ff5591c Drop support for native graphics system
Qt 5 only supports raster which means our pixmaps are always non native,
so we don't need the Extension information any more and can drop all
special code handling for mapping a native QPixmap to an X11 pixmap.
2013-07-24 09:46:54 +02:00
Fredrik Höglund 4b120288b6 kwin: Use glBufferSubData() when preferred
Use glBufferData() to reallocate the data store, and glBufferSubData()
to upload data to unused ranges of vertex buffers.
2013-07-08 01:23:38 +02:00
Fredrik Höglund 9de4c490ba kwin: Add GLPlatform::preferBufferSubData()
This method returns true when glMapBufferRange() is likely to perform
worse than glBufferSubData() when updating an unused range in a buffer
object.

This is the case with the NVIDIA driver, where glMapBufferRange()
will force thread serialization. The driver tracks which ranges of
the buffer are in use, so calls to glBufferSubData() should not
cause a pipeline stall.
2013-07-08 01:23:37 +02:00
Fredrik Höglund 6562fcc665 kwin: Don't query GL_VIEWPORT in pushRenderTarget()
Assume that the default framebuffer has the same dimensions as the screen.

By not quering the dimensions of the viewport we don't risk serialization
in drivers that use threaded dispatch.
2013-06-27 00:06:54 +02:00
Fredrik Höglund 7124f5190b Revert "kwin: Make WindowQuadList inherit from QVector"
This reverts commit 23dff966437bb664a2ffdb3f7957ef39978f5fad.

Using QVector is not a win when effects such as wobbly windows are
active, due to the realloc overhead. So revert this change for now.
2013-06-27 00:06:49 +02:00
Martin Gräßlin db2e6687e1 Remove dead assignment in GLVertexBuffer::draw
Variable primitiveMode is not read in the branch and there's a return in
the same branch.

REVIEW: 111192
2013-06-26 17:58:48 +02:00
Thomas Lübking e717c131bf Hook modalChanged signal for DialogParent script
Eg. gtk+ alters the modality after mapping and
before unmapping the window.
Therfore the former implementation ahd a wrong idea
about the modality until the window was activated and
again had a wrong idea when the dialog closed, keeping
the main client dimmed.

Modality changes at runtime are uncommon but legal and can
happen anytime.

BUG: 321340
FIXED-IN: 4.11
REVIEW: 111154
2013-06-26 12:42:09 +02:00
Aurélien Gâteau 4a426d731d kwin: Fix build on arm
CCMAIL: ubuntu@kitterman.com
2013-06-26 10:13:33 +02:00
Casian Andrei 8f92e2ab91 Avoid calling expensive GLShader::setUniform overload
REVIEW: 111196
2013-06-24 21:34:32 +03:00
Casian Andrei 40acb1da14 Remove unnecessary checkGLError() calls from color correction
Keep only the ones that should only be called once

REVIEW: 111060
2013-06-24 21:33:56 +03:00
Casian Andrei 79c35d0164 Enable color correction only after successfuly contacting KolorManager
Prevents the possiblity of using shaders modified for color correction
without valid data from KolorManager. If that happened, everthing
blacked out.

Now the color correction shaders are enabled only after successfuly
contacting KolorManager.

The issue was highlighted after ab7e228d.

BUG: 321217
2013-06-18 17:27:34 +03:00
Fredrik Höglund 2fc2004119 kwin: Reset the dirty flags in GLTexture
m_wrapModeChanged and m_filterChanged were never set to false,
causing the sampler parameters to be set every time a texture was bound.
2013-06-13 18:46:34 +02:00
Fredrik Höglund 9d03e16c34 kwin: Check that color correction is enabled in setupForOutput()
Return early if color correction is disabled, so this function
becomes a no-op in that case.
2013-06-11 23:28:48 +02:00
Fredrik Höglund 15dae59999 kwin: add a GLVertexBuffer::draw() overload
This overload doesn't take a clip region. Added for symmetry
with the render() method.
2013-06-11 05:11:41 +02:00
Thomas Lübking 88be3d0caf ensure to init animationeffect bindings
it seems an animation can be triggered and the resp.
window deleted in the first event cycle (before the deleted
signal is bound) - so we add an initialization flag to ensure
the binding happens before the first animation is added

BUG: 320562
FIXED-IN: 4.11
REVIEW: 110872
2013-06-10 16:38:03 +02:00