Commit graph

10184 commits

Author SHA1 Message Date
Martin Gräßlin
7e3809a3ca Split out Application Menu related code into own class
Following the approach to move out of Workspace what doesn't belong into
Workspace Appmenu support goes into an own class.

This also has the advantage of better compilation with Qt 5 as moc seems
to dislike ifdefs in the slot definitions.

REVIEW: 109497
2013-03-21 09:34:56 +01:00
Luca Beltrame
76cd9e6174 Merge remote-tracking branch 'origin/KDE/4.10' 2013-03-20 23:24:50 +01:00
Thomas Lübking
476ca65295 Depend fs layer upon active state, not stackorder
according to NETWM spec implementation notes suggests
"focused windows having state _NET_WM_STATE_FULLSCREEN" to be on the highest layer.
We'll also take the screen into account
The user set stacking (being raised) is not considered by the spec note
This behavior is also suggested by an old comment in activation.cpp, void Workspace::setActiveClient()

BUG: 296076
CCBUG: 224600
REVIEW: 109572
FIXED-IN: 4.11
2013-03-20 22:23:43 +01:00
Thomas Lübking
a5cce085af catch geometry updates of moving clients
and bind geometry change signals dynamically

REVIEW: 109570
2013-03-20 22:23:43 +01:00
Thomas Lübking
eab1166dbc set / withdraw iconic state for shaded clients
Should shaded windows be iconic?
I don't know. Apparently nobody does. (google found me discussions but no conclusion)

OpenBox, Metacity and Compiz set shaded Windows iconic, Sawfish and IceWM don't.

Either way kwin presently sets shaded windows iconic when you map them (client.cpp, void Client::map(allowed_t)) so to remain consistent with ourselves and half of the other WMs i set it.
Otherwise it should not be set when unshading a window
(no justification but noteworthy: the bug reporter seems to intend to pause expensive painting when the window is iconic and in that regard it's oc better to have it for shaded windows)

BUG: 317025
FIXED-IN: 4.11
REVIEW: 109593
2013-03-20 22:23:43 +01:00
Thomas Lübking
d6c652fd35 fix magnifier + xrender segfault 2013-03-20 22:23:43 +01:00
Thomas Lübking
c1bd7885cb catch maximized windows in ::keepInArea
BUG: 317068
FIXED-IN: 4.10.2
2013-03-20 22:23:41 +01:00
Thomas Lübking
5299f728fe catch geometry updates of moving clients
and bind geometry change signals dynamically

REVIEW: 109570
(cherry picked from commit eb2db41304f1ec1e597e9bd282a9c4f0b7dd1e54)

Conflicts:
	kwin/libkwineffects/kwinanimationeffect.cpp
2013-03-20 22:23:41 +01:00
Thomas Lübking
81931857b6 keep + track m_closeWindow to keep m_winData alive
BUG: 259640
FIXED-IN: 4.10.2
REVIEW: 109509
2013-03-20 22:23:40 +01:00
Thomas Lübking
c4d450455b catch maximized windows in ::keepInArea
BUG: 317068
FIXED-IN: 4.10.2
2013-03-20 21:11:36 +01:00
Thomas Lübking
4e1944ef53 catch geometry updates of moving clients
and bind geometry change signals dynamically

REVIEW: 109570
(cherry picked from commit eb2db41304f1ec1e597e9bd282a9c4f0b7dd1e54)

Conflicts:
	kwin/libkwineffects/kwinanimationeffect.cpp
2013-03-20 21:10:29 +01:00
Thomas Lübking
4babec9991 keep + track m_closeWindow to keep m_winData alive
BUG: 259640
FIXED-IN: 4.10.2
REVIEW: 109509
2013-03-20 21:04:59 +01:00
Script Kiddy
2515f30d6b SVN_SILENT made messages (.desktop file) 2013-03-19 16:40:02 +01:00
Script Kiddy
9ee5145fc9 SVN_SILENT made messages (.desktop file) 2013-03-18 08:58:15 +01:00
Fredrik Höglund
9c658a752c kwin: Simplify GLXBackend::initDrawableConfigs()
Use glXChooseFBConfig() instead of glXGetFBConfigs(), and prefer
the first usable configuration instead of the last.
2013-03-17 18:28:46 +01:00
Fredrik Höglund
00c0ad05d3 kwin: Require Xcomposite 0.3 for OpenGL compositing
Remove support for OpenGL compositing without using a composite
overlay window. With this change kwin now also requires a
double-buffered framebuffer configuration.
2013-03-17 18:28:46 +01:00
Fredrik Höglund
baeeb1b90b kwin: Simplify GLXBackend::initRenderingContext()
glXCreateNewContext() is supposed to return NULL on failure, so let's
assume that it does. Don't try to create an indirect context when
creating a direct context failed. glXCreateNewContext() should return
an indirect context when a direct context cannot be created.
2013-03-17 18:27:41 +01:00
Fredrik Höglund
96ed29497c kwin: Simplify GLXBackend::initBufferConfigs()
Use glXChooseFBConfig() instead of glXGetFBConfigs(), and prefer
the first usable configuration instead of the last.

Also rename initBufferConfigs() to initFbConfig().
2013-03-17 18:13:36 +01:00
Fredrik Höglund
8a14a0d610 kwin: Move some debug output to where it belongs 2013-03-17 18:08:54 +01:00
Fredrik Höglund
8446912502 kwin: Remove some left over support for GLX < 1.3
We require GLX_EXT_texture_from_pixmap which in turn requires GLX 1.3.
2013-03-17 18:01:52 +01:00
Fredrik Höglund
e393cc9069 kwin: Rename some variables in GLXBackend
ctxbuffer       → ctx
glxbuffer       → glxDrawable
buffer          → drawable
fbcbuffer       → fbconfig
fbcbuffer_db    → fbconfig_db
fbcbuffer_nondb → fbconfig_nondb
2013-03-17 17:53:38 +01:00
Martin Gräßlin
649264d738 Do not round integer values 2013-03-15 15:51:36 +01:00
Martin Gräßlin
9a6b1159fe Remove unused includes 2013-03-15 15:51:14 +01:00
Martin Gräßlin
d0cd0b1ce2 Add missing KIcon include 2013-03-15 15:44:08 +01:00
Martin Gräßlin
74f0ca2f00 Add missing KGlobal includes 2013-03-15 15:43:49 +01:00
Martin Gräßlin
600b3e3b91 Xcb port for egl backend
Noticed this one during test compile against Qt5 as QX11Info is no longer
exposing appVisual. Using the visual from root window which works just
fine for this use case.

REVIEW: 109411
2013-03-15 07:56:25 +01:00
Martin Gräßlin
0c86d31ff2 Remove kde4_no_enable_final from CMakeLists.txt
Tried to build KWin with enable final: it doesn't work. So if nobody uses
it, we don't need it in the CMakeLists to make it work.

Also it's removed in KF5 which means that removing it right now removes
differences in the build system.

REVIEW: 109357
2013-03-14 12:32:06 +01:00
Martin Gräßlin
1bb5a81292 Port SceneXRender to XCB
SceneXRender no longer uses XRender from XLib, but only XCB.

REVIEW: 109190
2013-03-13 08:19:14 +01:00
Martin Gräßlin
4e598ed641 Port SceneXRender::EffectFrame to XCB render 2013-03-13 08:12:40 +01:00
Martin Gräßlin
4a69ffb5c0 Do not use QPixmap::x11PictureHandle() to render shadow elements
The QPixmap's are wrapped using XRenderPicture.
2013-03-13 08:12:40 +01:00
Martin Gräßlin
ce930dfc8a Use xRenderBlendPicture as alpha mask in SceneXrender
Less duplicated functionality.
2013-03-13 08:12:40 +01:00
Martin Gräßlin
577a7030b6 Merge branch 'KDE/4.10'
Conflicts:
	kwin/clients/aurorae/src/aurorae.cpp
2013-03-13 08:09:53 +01:00
Martin Gräßlin
25fa3aac8c Disable animations in Plastik for native or non-compositing
Adding a new property on whether we want animations based on whether we
are on raster or with Compositing. The property is constant as the deco
gets recreated on compositing change state anyway.

REVIEW: 109456
BUG: 314532
FIXED-IN: 4.10.2
2013-03-13 08:07:21 +01: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
Ralf Jung
3a6d55b16e Get rid of the unreliable lastMask in the GL backend
REVIEW: 109396
2013-03-12 11:55:28 +01:00
Martin Gräßlin
abfc697b97 Merge branch 'KDE/4.10'
Conflicts:
	kmenuedit/main.cpp
	solid/solid-actions-kcm/device-actions/solid-device-SerialInterface.desktop
2013-03-12 09:31:06 +01:00
Martin Gräßlin
5891133111 Connect ThumbnailItem to Compositor::compositingToggled
If a KWin script uses a ThumbnailItem which gets created before the
Compositor is fully initialized the thumbnail is not shown at all because
the connect to windowAdded etc. will never happen.

Therefore connect to Compositor::compositingToggled to re-connect
whenever the compositing state changes.

REVIEW: 109310
2013-03-12 09:28:16 +01:00
Martin Gräßlin
30a3fade2b Fix incorrect Texture creation
The textures get created over QSize -> QPixmap conversation which is
obviously not intended here.

REVIEW: 109337
2013-03-12 09:24:44 +01:00
Martin Gräßlin
c3ec860a72 Drop ARB shader code path from Lanczos Filter
Since color correction got pushed merged in the Lanczos Filter is only
created for OpenGL2. Which means the complete ARB shader code path has
been dead since 4.10 anyway.

REVIEW: 108856
2013-03-12 08:48:37 +01:00
Martin Gräßlin
fb65c07bf7 Use a QDeclarativeView for button views in Present Windows and Desktop Grid
Declarative UI++

REVIEW: 109409
2013-03-12 08:40:46 +01:00
Martin Gräßlin
fbc11aad13 Temporarily revert to XDisplayWidth/Height
We don't like broken master. Proper fix coming later on.

BUG: 316040
2013-03-11 15:14:21 +01:00
Martin Gräßlin
7ab5df9de8 Define GL_UNPACK_* for gles if not defined
Should fix build error in build.kde.org.
2013-03-11 12:36:40 +01:00
Martin Gräßlin
9df3af1dc6 Do not needlessly copy from QPixmap to QImage in PaintRedirector
The scratch PaintDevice is provided by the PaintRedirector's subclasses
allowing the ones wanting a QImage to provide the QImage directly and the
ones needing a QPixmap to provide a pixmap. This means the copy from
QPixmap to QImage is no longer needed in the OpenGL and XRender/raster
paint redirector.

REVIEW: 109138
2013-03-11 11:36:41 +01:00
Martin Gräßlin
9206f530ce Adding support for GL_EXT_texture_format_BGRA8888 in GLES
If extension is present texture format BGRA_EXT is used for loading
textures from QImages.

REVIEW: 109090
2013-03-11 11:21:14 +01:00
Martin Gräßlin
aa549f45d5 OpenGLPaintRedirector updates textures directly
Ownership of decoration textures is moved from SceneOpenGL::Window to
OpenGLPaintRedirector. The PaintRedirector is responsible for updating
the textures whenever they change. For this GLTexture is extended by an
update(QImage, QPoint) method which uses glTexSubImage2D to update only
the changed parts.

The big advantage compared to before is that if e.g. only a button is
animated only the button part is updated instead of the complete deco
part.
2013-03-11 11:21:11 +01:00
Martin Gräßlin
fba7504063 Introduce dedicated PaintRedirector subclasses for OpenGL/XRender
PaintRedirector is turned into an abstract class providing a factory
method which returns either an instance of
* OpenGLPaintRedirector
* NativeXRenderPaintRedirector
* RasterXRenderPaintRedirector

OpenGLPaintRedirector is basically doing exactly the same as the parent
class used to do before. Though the idea is to extend the functionality
to have the PaintRedirector write directly into OpenGL textures to limit
copying the complete decorations.

NativeXRenderPaintRedirector is similar to OpenGLPaintRedirector by
rendering into a QPixmap and providing the pictureHandle for the QPixmap
to SceneXRender.

RasterXRenderPaintRedirector is providing the functionality for the case
that the QPixmap/XPixmap relationship is not present. From the QPixmap
containing the pending decoration paint a QImage is created and then the
relevent parts are copied directly into the decoration pixmap.

REVIEW: 109074
2013-03-11 11:19:57 +01:00
Martin Gräßlin
e9eb48c735 Use own screen number instead of asking QX11Info
Wouldn't compile with Qt 5 as there the method is missing and the ctor
is private.

REVIEW: 109338
2013-03-08 09:26:27 +01:00
Martin Gräßlin
6424a44632 Add some missing includes with Qt5/KF5 2013-03-07 13:59:16 +01:00
Martin Gräßlin
544b772e42 Use non obsoleted ctor for KXMessages 2013-03-07 13:59:16 +01:00
Martin Gräßlin
ab88d8e3b0 Include kwinglobals in kdecoration.h for KWIN_EXPORT
No need to define it twice in KWin.
2013-03-07 13:59:16 +01:00