Commit Graph

10492 Commits (395ff72555ddcf785005499f8e21833cb6d2ccdb)

Author SHA1 Message Date
Fredrik Höglund 395ff72555 kwin: Change the way attrib formats are stored in GLVertexBuffer
Store the formats as an array in GLVertexBufferPrivate.

This simplifies the code for enabling the generic vertex arrays,
and also makes it easier to add new arrays.
2013-05-28 16:35:35 +02:00
Fredrik Höglund 1de20a39a0 kwin: Add convenience classes for working with bitfields 2013-05-28 16:35:35 +02:00
Fredrik Höglund 5782d5307e kwin: Add a Color uniform in GLShader
And use it in GLVertexBufferPrivate::bindArrays(). Also store the color
as a QVector4D in GLVertexBufferPrivate.
2013-05-28 16:35:35 +02:00
Fredrik Höglund c41d05d36c kwin: Do some more refactoring in GLVertexBuffer
Consolidate the code for binding and unbinding the vertex arrays into
two new methods called bindArrays() and unbindArrays() respectively.

This patch also removes the three paint implementations, since the only
difference between them is the code that sets up the arrays. The actual
painting code is moved into GLVertexBuffer::render(), which uses the
new methods to bind and unbind the arrays.
2013-05-28 16:35:35 +02:00
Martin Gräßlin 3f69bb0e7f Change Client's clormap to xcb_colormap_t
At same time also renaming variable to follow naming scheme and have a
sensible name. Also moved default value initialization into initializer
list.

REVIEW: 110283
2013-05-28 11:55:39 +02:00
Martin Gräßlin 41b37afa96 Use xcb_timestamp_t for ping window functionality
At same time rename the variable to follow m_camelCase naming scheme and
initialise the variable with default value in ctor.
2013-05-28 11:55:39 +02:00
Martin Gräßlin b39965ec27 Client's userTime related code ported over to XCB
At same time variable user_time renamed to m_userTime to follow naming
scheme.
2013-05-28 11:55:39 +02:00
Martin Gräßlin dc1496f731 Client::killProcess takes xcb_timestamp_t as argument 2013-05-28 11:55:39 +02:00
Martin Gräßlin 48f08bca83 Client::embedClient() takes an xcb_window_t as argument 2013-05-28 11:55:39 +02:00
Martin Gräßlin edefd5f3d2 Port Client::sendClientMessage to XCB 2013-05-28 11:55:39 +02:00
Martin Gräßlin 5632285b1e Client's button(Press|Release)Event and motionNotifyEvent accept xcb_window_t 2013-05-28 11:55:39 +02:00
Martin Gräßlin 7cf461b154 Client::readIcons accepts xcb_window_t as argument 2013-05-28 11:55:39 +02:00
Martin Gräßlin 1b7d2e5ca4 Client::restackWindow() accepts xcb_(window|timestamp)_t as argument
At the same time X define usage is changed to XCB enums.
2013-05-28 11:55:39 +02:00
Martin Gräßlin 2f718bd4fb Client::manager() takes an xcb_window_t as argument 2013-05-28 11:55:39 +02:00
Martin Gräßlin a616d1fe57 Client::decorationId() returns an xcb_window_t 2013-05-28 11:55:39 +02:00
Martin Gräßlin 5dae0cb010 Change Client::window_group to xcb_window_t
At the same time adjust name to m_camelCase to follow naming scheme.
2013-05-28 11:55:38 +02:00
Martin Gräßlin 5afe5f810e Port Client::transient_for handling to XCB
The type of the transient_for related variables are changed to
xcb_window_t. They cannot be Xcb::Window as we don't take ownership over
the transient for window.

Variables are renamed to m_camelCase to follow naming scheme.

A wrapper for retrieving the TransientFor hint is added to the Xcb
Wrappers.
2013-05-28 11:55:38 +02:00
Martin Gräßlin 9d1fb072d4 Find xcb_icccm and link it in KWin core
We need it for porting some aspects of Client to XCB.
2013-05-28 11:55:38 +02:00
Martin Gräßlin aa55cf98ae Port Client's move resize grab window to XCB
Using Xcb::Window to wrap this helper window and port all the used XLib
calls to XCB.

Also renaming the variable to m_ and camel case to follow general naming
scheme.
2013-05-28 11:55:38 +02:00
Martin Gräßlin b4d2129a3f Port Client::client to XCB
Unfortunately the Xcb::Window wrapper cannot be used for the client
window as the client should not be destroyed by KWin.

All the API calls except XSelectInput are changed to xcb and the name is
adjusted to m_client to follow the naming scheme.
2013-05-28 11:55:38 +02:00
Martin Gräßlin 424589ab4a Use an Xcb::Window for Client::wrapper
The Xcb::Window nicely encapsulates the created wrapper window. As
almost all code is adjusted, the variable is also renamed to
m_wrapper to follow the normal naming scheme.
2013-05-28 11:55:38 +02:00
Martin Gräßlin 8b2a5f9936 Support for cursor change tracking in KWin::Cursor
KWin::Cursor can track changes to the cursor image. It supports a
start/stop tracking to not handle these events if nobody is interested in
them. When enabled and the cursor image changes a signal is emitted with
the serial number of the new cursor image.

To track cursor image changes xcb_xfixes_select_cursor_input is used (see
XFixes Version 5.0 protocol, section 7).

This could be useful for the zoom effect when it replaces the cursor.

REVIEW: 110519
2013-05-28 08:02:59 +02:00
Martin Gräßlin 17e38f3357 Remove "Block global shortcuts" global shortcut
This shortcut did not make any sense to me, because you could block the
global shortcuts for KWin, but not re-enable them again. So once blocked,
it was blocked for ever till kwin --replace &.

This is in opposite to the commit message which introduced it
(see BUG 108961).

REVIEW: 110364
2013-05-28 08:02:12 +02:00
Martin Gräßlin 92bc318e45 Only execute kwin_opengl_test if OpenGL/GLX is going to be used
* don't execute OpenGL test app if user selected XRender
* don't execute OpenGL test app if user forces to EGL

If a user selected XRender because OpenGL is failing badly it might not
be the best idea to call an OpenGL application.

If the user enforces EGL it's kind of pointless to call a testapp which
uses GLX.

REVIEW: 110659
2013-05-28 07:39:17 +02:00
Martin Gräßlin 2be7da70e0 Adding support information for Decorations
Unfortunately only information available through the factory can be read.
As Factory is not a QObject we cannot use the Q_SLOT trick to get further
information dynamically from the loaded decoration plugin.

REVIEW: 110665
2013-05-28 07:37:42 +02:00
Martin Gräßlin bd01bfefb4 Improve multi-head detection for OpenGLIsUnsafe
This was currently basically broken:
* Screen number got always attached
* openGLIsBroken did not check for screen number
-> KCM reported "everything is fine" while it wasn't

Now changed to:
* only attach screen number if it is a multi-head setup
* use same logic in both Composite and CompositingPrefs

Still problematic:
* kcm is not multi-head aware so it will report everything is fine in
  case of a broken multi-head setup

REVIEW: 110631
2013-05-27 08:16:21 +02:00
l10n daemon script 79d09f5336 SVN_SILENT made messages (.desktop file) 2013-05-25 04:07:51 +00:00
l10n daemon script 3a0999688f SVN_SILENT made messages (.desktop file) 2013-05-24 03:35:07 +00:00
Martin Gräßlin 4f2f8bda11 Use GLSL 1.40 shaders as GLSL 300 es shaders for effects
Like for the scene shaders. Makes the effects work again when using
GLES 3.
2013-05-23 09:55:16 +02:00
Martin Gräßlin 5c78f7eabe GLSL 1.40 shader for lookingglass effect
REVIEW: 110574
2013-05-23 09:45:26 +02:00
Martin Gräßlin c00d468f0f GLSL 1.40 shader for CoverSwitch Reflection
Shader moved to 1.10 subdirectory and a new version for 1.40 added.
At the same time call to glPolygonMode removed as it caused errors with
core context (and seems to not be needed).

REVIEW: 110572
2013-05-23 09:43:43 +02:00
Martin Gräßlin c1486596fb GLSL 1.40 shaders for cube effect
Shaders are moved into dedicated directories 1.10 and 1.40. 1.10 contains
the already existing versions, 1.40 copies of them adjusted to GLSL 1.40.

REVIEW: 110571
2013-05-23 09:39:35 +02:00
Martin Gräßlin 2bee9a0ee0 Use generic fragment shader for Cylinder and Sphere
Shaders were broken. Issue mentioned in the TODO seems to no longer be
present (at least not on the system I used for testing).

REVIEW: 110570
2013-05-23 09:38:14 +02:00
Martin Gräßlin 58ffb7b627 GLSL 1.40 shader for invert effect
REVIEW: 110573
2013-05-23 09:34:51 +02:00
Martin Gräßlin 95656c3936 Remove the u_forceAlpha
It's unused nowadays.
2013-05-23 09:34:50 +02:00
Martin Gräßlin 769c746a06 Use GLSL 1.40 shaders as GLSL 300 es shaders
In case OpenGL ES 3 is provided by the driver we can use the GLSL 1.40
shaders as GLSL 300 ES shaders. The #version declarative is rewritten in
such a case.

REVIEW: 110590
2013-05-23 09:06:21 +02:00
Martin Gräßlin ad1203e3b2 Add defines from EXT_robustness
Seem to be missing in the headers used on build.kde.org.
2013-05-23 08:38:16 +02:00
Yuri Chornoivan 0ef7822d65 Fix typos 2013-05-23 08:34:36 +03:00
Fredrik Höglund 041be646b5 kwin: Detect and handle graphics resets
Reset compositing when the GL context state has been lost as a result
of a graphics reset.
2013-05-22 23:38:51 +02:00
Fredrik Höglund 7f0d0436e9 kwin/glx: Add support for GLX_ARB_create_context_robustness
Request a context with robust buffer access behavior, and set the reset
notification strategy to GLX_LOSE_CONTEXT_ON_RESET_ARB.
2013-05-22 23:37:15 +02:00
Thomas Lübking f2dd6d02b1 add previous screen shortcuts
REVIEW: 110521
BUG: 303083
FIXED-IN: 4.11
2013-05-22 22:25:15 +02:00
Thomas Lübking b3d8ce9044 make minimized windows first of minimized
instead of last, causingding to  general LIFO

REVIEW: 110567
2013-05-22 22:24:35 +02:00
Thomas Lübking e5028bb7fc redesign focus config GUI
REVIEW: 110001
2013-05-22 22:24:23 +02:00
Martin Gräßlin cb77b468f8 Use GlSwapStrategy in property definition
At least supportInformation did not like a char there at all.
2013-05-22 09:26:04 +02:00
Martin Gräßlin 1446fd6a38 Fix printing of GLSL version in supportInformation
If GLSL was supported, but not limited the information did not get added
to the output.
2013-05-22 09:18:05 +02:00
Martin Gräßlin 561a4f437a Enable Lanczos for IvyBridge and Mesa 9.2 again
Performance regression is fixed in Mesa 9.2. See Bug report
https://bugs.freedesktop.org/show_bug.cgi?id=61554

CCBUG: 313613
REVIEW: 110569
2013-05-22 08:20:49 +02:00
l10n daemon script a3b09b7ac4 SVN_SILENT made messages (.desktop file) 2013-05-22 03:36:01 +00:00
Martin Gräßlin 0ccb774309 Fix Typo 2013-05-21 09:27:38 +02:00
Fredrik Höglund 19796b8263 kwin: Use the robust access functions
Use glReadnPixels() instead of glReadPixels(), and glGetnUniformfv()
instead of glGetUniformfv().
2013-05-21 00:22:57 +02:00
Fredrik Höglund 2f87b7542f kwin/es: Resolve functions for GL_EXT_robustness 2013-05-21 00:22:57 +02:00