Commit graph

12698 commits

Author SHA1 Message Date
Martin Gräßlin
658ff303fe [effects] Support building the effect_builtins without need to link the lib
This change allows to include the effect_builtins.cpp into the build of
e.g. a kcm without having to link against all effects.

The use case for this is when one needs to resolve just the name of an
effect without wanting to hard code the name.
2015-01-29 11:44:47 +01:00
Martin Gräßlin
a93a2ab191 Disable libinput integration if >= 0.8 is found
libinput 0.8 is incompatible causing the build to fail. As we are in
dependency freeze the only option is to disable the build.

BUG: 342893
FIXED-IN: 5.2.1
2015-01-28 16:20:57 +01:00
David Edmundson
b62bf43236 Avoid deleting an engine whilst components from our engine are still in use
Otherwise it can lead to crashes

Reviewed-by: Martin G
2015-01-28 14:12:25 +01:00
Marco Martin
63885cc5b3 use xembed for the qml view of window decorations modul
the only way to ensure the view won't randomly become black
(probably QQuickwidget won't be fixed in qt anytime soon or
ever in 5.x lifetime due to how architecturally is)

basically systemsettings has no control of what gets loaded in,
if one other kcm will call winId(), this one will break.

BUG:341971
2015-01-28 09:58:47 +01:00
Martin Gräßlin
3b6ab89617 [kcmkwin/deco] Do not runtime depend on QtQuick 2.4 (Qt 5.4)
Sorry, sorry, sorry! We need better runtime checks on the CI.
2015-01-27 14:08:12 +01:00
l10n daemon script
795ebbb879 SVN_SILENT made messages (.desktop file) 2015-01-27 12:18:48 +00:00
Martin Gräßlin
7508cd49e0 Trigger rebuilding of quads after creating a new DecorationShadow
If there were already a shadow, the quads are rebuild, but not if
we created a new shadow. This is not a problem if the shadow exists
before the quads are built for the first time (e.g. when managing
the window), but if the shadow is created later on the quads are
incorrect and the shadow doesn't get rendered at all. This happens
for example with Aurorae based decoration themes, where the creation
of the first shadow is delayed into the next event cycle.
2015-01-27 11:42:21 +01:00
Martin Gräßlin
1e41e3e674 Properly disconnect the test xcb connection
So far it only got disconnected in the multi-head situation.

REVIEW: 122218
2015-01-26 11:11:09 +01:00
Martin Gräßlin
52793c5e5b [kcmkwin/deco] Fix build for Qt < 5.4
QQuickWidget::setClearColor is new in Qt 5.4. Sorry about the unintended
breakage of building with Qt 5.3.
2015-01-26 10:27:39 +01:00
Jonathan Riddell
f26845cf8f Update version number for 5.2.0 2015-01-22 11:34:22 +01:00
Thomas Lübking
ce2fa727e8 Overhaul of deco kcm
- align with system palette
- base color for buttons and preview individually
  to create a visual gap (make them more standalone)
- downsized button config buttons to match up w/ preview
  appearance (and because it was simply to huge for a desktop thing)
- upsized preview to preferably show two elements at once
  (current + 2*1/2context)
- made the titlebar a visible visual element
- label the titlebar "Titlebar"
- move the (altered) hint to the drag-from area
- hint draggability with a pointing hand cursor
- less hardcoded values
- brief animations on button adding/removing

BUG: 337544
REVIEW: 122064
2015-01-22 01:31:31 +01:00
l10n daemon script
56b830202e SVN_SILENT made messages (.desktop file) 2015-01-21 09:49:18 +00:00
Martin Gräßlin
6e67badfab Handle case that XCURSOR_SIZE environment variable is not set
In a default startup startkde does not set XCURSOR_SIZE environment
variable. Only XCURSOR_THEME is set. The size should be DPI dependent.
With this patch Cursor is able to handle this situation and does not
fall back to loading the config from file. Logic is taken from
KHintsSettings in frameworkintegration which in turn is from
KApplication.

REVIEW: 122139
2015-01-21 09:24:01 +01:00
Martin Gräßlin
4a260c6f42 [kcmkwin/tabbox] Improve locating the services used in preview mode
Instead of hard coding the desktop files, let's try to use what the
user actually uses.
 * Browser mapped from text/html mime type
 * File manager mapped from inode/directory mime type
 * Email client mapped from message/rfc822 mime type

Only systemsettings is "hard coded" as there is no mime type to map.

The thumbnails are not changed, though. But they are so small that
it's hardly recognizable anyway. For future it could be considered to
map against appdata to get a better screenshot.

BUG: 310622
REVIEW: 122170
2015-01-20 15:25:16 +01:00
Martin Gräßlin
198ce47fec [scene-xrender] Trigger a full decoration repaint when sizes are dirty
When the pixmaps are re-created we should ensure that they are filled
with proper content.

BUG: 342980
REVIEW: 122148
2015-01-19 15:30:06 +01:00
Martin Gräßlin
2910645df0 [scene-xrender] Implement support for DecorationShadow
The DecorationShadow on XRender is implemented by creating the
required QPixmaps in ::prepareBackend. That way the rendering
infrastructure can be shared with the window based shadows.

BUG: 342758
REVIEW: 122009
2015-01-19 09:30:01 +01:00
Tobias C. Berner
ef3f0f753b Add <array> include where needed, to make it build on FreeBSD.
REVIEW: 122090
2015-01-17 15:22:11 +02:00
Martin Gräßlin
60ebdbe352 Improve reading the color scheme in Client
Only emit paletteChanged signal and repaint decoration if the palette
actually changed. Even more important: check for path.isEmpty() instead
of path.isNull(). ::isNull() returns false for "" causing a costly
creation for default color scheme.

REVIEW: 122083
2015-01-16 07:58:32 +01:00
Martin Gräßlin
7dc2baf74d Update cursor theme when it changes at runtime
Connecting to the DBus signal emitted on KGlobalAccels by the
cursor kcm and forcing a reload of all cursors. For runtime
config change we need to take the config value and need to ignore
the now outdated environment variables.

REVIEW: 121928
BUG: 325763
FIXED-IN: 5.2.0
2015-01-14 08:45:22 +01:00
Martin Gräßlin
ab4b1ba25a First try getting cursor theme from environment variable
If XCURSOR_THEME and XCURSOR_SIZE are set they are preferred over
reading the values from kcminputrc.

REVIEW: 121923
BUG: 334954
FIXED-IN: 5.2.0
2015-01-14 08:33:33 +01:00
l10n daemon script
d173ff7412 SVN_SILENT made messages (.desktop file) 2015-01-13 12:47:17 +00: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
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
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
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