Commit graph

12681 commits

Author SHA1 Message Date
Martin Gräßlin
32cea73843 Merge branch 'Plasma/5.2' 2015-01-13 08:46:54 +01:00
Martin Gräßlin
5e47d41f7b [effects/startupfeedback] Use dedicated shader for bouncing cursor
BUG: 342203
REVIEW: 121941
2015-01-13 08:46:11 +01:00
Lasse Liehu
4963bf3d44 Fix QTranslator installation for Qt translations
The translator instance was uninstalled right away after installation
because it was destroyed when returning from the function.

REVIEW: 121977
2015-01-12 21:10:38 +02:00
Martin Gräßlin
e609429e9b Merge branch 'Plasma/5.2' 2015-01-12 14:32:13 +01:00
Martin Gräßlin
c4fb3cd55d [kdecoration] Try falling back to default plugin and Aurorae
If the configured decoration plugin fails to load, we try to load
the default decoration plugin. If that also fails to load, we try
to load Aurorae, which is shipped with KWin, so the chances are
higher that it is available.

Also the checks in Aurorae are improved to fall back to the Plastik
theme if the selected SVG theme is not available.

BUG: 341014
FIXED-IN: 5.2.0
REVIEW: 121859
2015-01-12 14:30:30 +01:00
Martin Gräßlin
fcd8cf3ada [glxbackend] Introduce env variable KWIN_USE_INTEL_SWAP_EVENT
The feature is pretty much untested as it depends on Qt 5.4 and this
was not a requirement during the development of 5.2. On the other hand
regressions in this feature are very severe as it can freeze the screen
and by that render the system unusable.

This change disables the feature by default. To enable it use the
environment variable KWIN_USE_INTEL_SWAP_EVENT=1.

CCBUG: 342582
REVIEW: 122008
2015-01-12 14:30:02 +01:00
Martin Gräßlin
9fb27bc0ba [decoration] Use client's depth in X11Renderer for put_image
If the Client uses ARGB the depth is not 24, thus we should use
the actual depth from the Client.

BUG: 342757
2015-01-12 11:43:29 +01:00
Martin Gräßlin
8f1975b906 Merge branch 'Plasma/5.2' 2015-01-12 08:55:11 +01:00
Martin Gräßlin
6f0e4b2d5a [glxbackend] Add default values for member variables 2015-01-12 08:54:25 +01:00
Martin Gräßlin
6b0ae95b80 Increase so-version for kwineffect libraries
Known ABI changes in at least GLTexture, probably more places.
2015-01-09 16:03:23 +01:00
Martin Gräßlin
4f80a3d3a8 Increase so-version for kwineffect libraries
Known ABI changes in at least GLTexture, probably more places.
2015-01-09 14:13:02 +01:00
Fredrik Höglund
301a996563 glx: Fix the swap event filter for DRI3 drivers
The drawable field is set to the X drawable ID when the swap event is
synthesized by DRI2WireToEvent(), and the GLX drawable ID when the
event is received over the wire. The latter being the case with DRI3.

__glXWireToEvent() fixes this for Xlib clients by changing the field
to the X drawable ID. This doesn't work for xcb clients however,
so we have to expect the field to be set to either the X or the GLX
drawable ID.

BUG: 342582
2015-01-08 14:20:10 +01:00
David Edmundson
9fe660ac5c Notify when the client palette changes and proxy this to kdecoration
BUG: 341921
REVIEW: 121917
2015-01-08 13:16:20 +01:00
Martin Gräßlin
38849215d5 Recursion check while decoration updates the borders
Mostly a safety check, but fixes a crash with borderless maximized
windows. If that option is set we also do not notify the decoration
at all, as the deco will be destroyed anyway.

BUG: 341675
REVIEW: 121858
2015-01-08 12:50:05 +01:00
Jonathan Riddell
3f6524da8b Update version number for 5.1.95 2015-01-08 11:43:14 +01:00
Martin Gräßlin
c69dec566c Use layerRepaint with visibleRect from Client::map
When map is called we need to repaint the complete area including
decoration shadows (e.g. might be called after unminimize). Therefore
we use a layer repaint with the visibleRect.

BUG: 342085
REVIEW: 121891
2015-01-08 09:07:21 +01:00
Martin Gräßlin
ca1354e8af [effects/blur] Disable cached blur for deleted windows
This is a kind of workaround for the flicker of fading out windows.
When a window is faded out it is a deleted and can by that be used
as a sufficient solution to work around the problem.

BUG: 307112
FIXED-IN: 5.2.0
REVIEW: 121909
2015-01-08 09:07:21 +01:00
Thomas Lübking
f61d3ade84 shortcut rendering textures for empty an rect
it makes no sense and there's a good chance
that in this case m_vbo is still nullptr and
it will not be created since d->m_cachedSize
will be an empty size as well
-> nullptr access -> crash

BUG: 337090
FIXED-IN: 5.2
2015-01-08 00:29:04 +01:00
Thomas Lübking
8de4e4d84e determine screenArea by geom_restore in checkWSP
checkWorkspacePosition() operates on geom_restore
to preserve window positions on temporary
(without moving/resizing the window by the user)
screen layout/geometry changes.

Therefore, in the multiscreen case the
screenbound check must be done towards
the screen the window *would* be on
according to geom_restore, not the one
it is right now.

CCBUG: 161325
REVIEW: 121320
FIXED-IN: 5.2
2015-01-08 00:09:11 +01:00
Thomas Lübking
38eb260478 Sync GetAddrInfo thread cancel in destructor
QFutureWatcher::cancel() might be still processed
(it's another thread) while the inherited ~QObject()
deletes the FutureWatcher

BUG: 327287
REVIEW: 121225
2015-01-08 00:06:47 +01:00
Thomas Lübking
f3a1d1bd3d updateXTime for kde_net_wm_user_creation_time
explicitly

CCBUG: 340994
CCBUG: 337798
2015-01-08 00:06:35 +01:00
l10n daemon script
debe14d04e SVN_SILENT made messages (.desktop file) 2015-01-06 10:55:59 +00:00
Fredrik Höglund
38f1945c6c Use swap events to drive repaints
Don't start the composite timer at the end of performPaint() when a
buffer swap is pending and vsync is enabled.  Instead set
m_composeAtSwapCompletion to true so performPaint() gets called again
as soon as the swap completes.

This makes the repaint cycle look like this:

    scene->paint()
    SwapBuffers()
    Process events
          ·
          ·
    Swap completes
    Fetch and reset damage (if applicable)
    scene->paint()
    SwapBuffers()
    Process events
          ·
          ·
    Swap completes
    ...

This results in a noticeable improvement in animation smoothness with
drivers that support GLX_INTEL_swap_event, since we're now able to
consistently render at the monitor refresh rate.
2015-01-06 07:51:50 +01:00
Hugo Pereira Da Costa
02d0a5bb7d Also send a QHoverEvent to the decoration when MotionNotify event occurs in input window, in order to get the right cursor shape and resize mode from extended borders
REVIEW: 121556
2015-01-03 18:02:08 +01:00
Kai Uwe Broulik
2153174dc0 Add OnScreenDisplayLayer which is placed even ontop of the active fullscreen window
It is to be used for volume change feedback and similar confirmation popups

REVIEW: 121300
2015-01-02 12:11:54 +01:00
Fredrik Höglund
2cebf523aa Store shadows in GL_R8 textures when possible 2014-12-30 21:22:04 +01:00
Fredrik Höglund
35110d72c6 Avoid converting images in GLTexture when possible
Don't convert the QImage when the image format can be specified as
a format/type combination to glTex(Sub)Image().
2014-12-30 21:22:00 +01:00
Fredrik Höglund
7fd4cf0227 Add GLTexture::setSwizzle()
This method allows the caller to specify which component of a texel
is placed in each respective component of the vector returned to the
shader.
2014-12-30 21:19:49 +01:00
Fredrik Höglund
4d738b86ea Add an internalFormat parameter to the GLTexture ctor
This parameter is ignored on GLES.
2014-12-30 21:19:49 +01:00
Lukáš Tinkl
20a1cb2e33 extract the strings also from QML 2014-12-16 21:02:27 +01:00
Martin Gräßlin
233730e8bf [aurorae] Send MouseButtonDblClicked to the QQuickWindow
Needed to make MouseArea on MenuButton accept double click events.
2014-12-16 08:44:26 +01:00
Martin Gräßlin
e8a52bbe65 [aurorae] Use mousePressAndHoldInterval from StyleHints 2014-12-16 08:27:11 +01:00
Fredrik Höglund
74b65fcd00 Add support for GL_ARB_texture_storage
Use glTexStorage2D() to allocate storage for the texture. The structure
of the resulting texture becomes immutable and the texture is always
mipmap complete.  This allows the driver to skip the mipmap consistency
checks when validating the texture at draw time.
2014-12-14 18:33:52 +01:00
Fredrik Höglund
450be6a378 Add a levels parameter to the GLTexture ctor
Prior to this commit we didn't know if mipmaps were going to be used
when we created the GL texture, which meant that we couldn't tell the
driver whether to allocate storage for mipmaps or not.

This resulted in one of two things happening depending on the driver;
either it would allocate storage for mipmaps that in most cases would
never be used, or it wouldn't and would later be forced to reallocate
the texture when mipmaps were added.

By adding this parameter we can now explicitly tell the driver how
many mipmap levels will be used.

The parameter is only added to the non-image constructor for now. The
image constructor is changed to only allocate a single level, which
matches how textures created from images are used in kwin. This may
need to be revisited in the future.
2014-12-14 18:33:52 +01:00
Fredrik Höglund
ccf1bad426 Make mipmap filters other than GL_LINEAR_MIPMAP_LINEAR work
GLTexture would set both the minification and magnification filters
to GL_NEAREST if the texture filter was set to any mipmap filter other
than GL_LINEAR_MIPMAP_LINEAR.
2014-12-14 18:33:52 +01:00
Fredrik Höglund
aefadfaa6a Don't generate mipmaps in GLTexture::bind()
This code is broken in a number of different ways; firstly by assuming
that the mipmaps need to be regenerated when the texture filter has
changed. Secondly by preventing mipmaps from being specified by other
means.

This commit removes the code from bind() and adds a generateMipmaps()
method instead.
2014-12-14 18:33:52 +01:00
Fredrik Höglund
5ac159d47e Fix cross-fading
We have to bind a modulation shader when we're cross-fading.

BUG: 341715
2014-12-14 18:33:52 +01:00
Martin Gräßlin
060b310082 [aurorae] Do not update shadow from ::paint
Paint is in the middle of the compositor rendering loop. Updating
the shadow at that point breaks KWin. Thus we delay the update to
the next event cycle. Obviously it would be even better to only
update the shadow if it changed, but that might be too expensive.
2014-12-12 22:12:11 +01:00
Hugo Pereira Da Costa
97de9856ea Fixed data type for _KDE_NET_WM_BLUR_BEHIND_REGION
REVIEW: 121459
2014-12-12 17:02:38 +01:00
Martin Gräßlin
5ceb1b4f75 Merge branch 'Plasma/5.1'
Conflicts:
	CMakeLists.txt
	geometry.cpp
	kcmkwin/kwincompositing/kcmkwineffects.desktop
	kcmkwin/kwincompositing/kwincompositing.desktop
	kcmkwin/kwindecoration/kwindecoration.desktop
	kcmkwin/kwindesktop/desktop.desktop
	kcmkwin/kwinoptions/kwinactions.desktop
	kcmkwin/kwinoptions/kwinadvanced.desktop
	kcmkwin/kwinoptions/kwinfocus.desktop
	kcmkwin/kwinoptions/kwinmoving.desktop
	kcmkwin/kwinoptions/kwinoptions.desktop
	kcmkwin/kwinrules/kwinrules.desktop
	kcmkwin/kwinscreenedges/kwinscreenedges.desktop
	kcmkwin/kwintabbox/kwintabbox.desktop
	scripts/enforcedeco/metadata.desktop
2014-12-10 13:52:27 +01:00
Martin Gräßlin
a2393a5c84 [kcmkwin/screenedges] Drop check whether Compositing is enabled
Reading the configured value might be wrong, so it's better to not
check at all.

REVIEW: 121312
2014-12-10 13:49:07 +01:00
Pino Toscano
04305bf1e0 fixuifiles 2014-12-10 12:05:43 +01:00
Martin Gräßlin
d6014927e7 Cleanup electric border handling in leaveMoveResize
If a Client closed during move/resize with the outline being shown
for quick tile/maximize area, the outline never got removed.

BUG: 341673
FIXED-IN: 5.1.2
REVIEW: 121410
2014-12-10 07:45:39 +01:00
Fredrik Höglund
91c087e9da glx: Port GlxBackend::initBuffer() to xcb 2014-12-09 22:18:49 +01:00
Fredrik Höglund
2b8dba8429 glx: Improve the fbconfig debug output
Provide more information than just the depth and the visual ID.
2014-12-09 22:18:47 +01:00
Fredrik Höglund
ca777f38f1 glx: Do additional sorting of fbconfigs
Prefer configurations with smaller depth/stencil sizes.
2014-12-09 17:36:21 +01:00
Fredrik Höglund
fb4e733bcc glx: Don't allocate storage for mipmaps in TFP textures
We never use a mipmap filter when we render windows.
2014-12-09 17:35:50 +01:00
Martin Gräßlin
2fa0f2fecc [kcmkwin/deco] Drop outdated source and ui files
All the ui components no longer used in the decoration KCM.
2014-12-09 16:14:03 +01:00
Martin Gräßlin
d5233a6b6f [kcmkwin/deco] Bring back a decoration buttons configuration interface
The decoration button configuration interface is merged into the QML
part using two list views (left buttons, right buttons) and a grid
view for all the available buttons.
2014-12-09 16:07:27 +01:00
Martin Gräßlin
c8d814c11d Add ContextHelp button to default right buttons 2014-12-09 16:05:19 +01:00