Commit graph

157 commits

Author SHA1 Message Date
Martin Gräßlin
58668e52a0 [kcmkwin/compositing] Show warning message when selecting "dangerous" options
The idea is to warn the user that changing the settings might break
the setup when we know it could be dangerous. The following cases are
considered:
* Scale filter Accurate
* Tearing prevention
* keep window thumbnail always
* EGL if EGL and GLX are available
* unredirect fullscreen not working on all hardware

In addition the OpenGL is Unsafe warning is turned int a KMessageWidget
which is also used for all the other warnings.

REVIEW: 118494
2014-06-16 09:04:33 +02:00
Martin Gräßlin
c16472e535 [kcmkwin/compositing] Use a classic ui file for the Compositor settings
For a classic user interface like the advanced compositor settings the
good old widgets are still better suited than the new QuickControls.

REVIEW: 118273
2014-06-02 14:58:00 +02:00
Martin Gräßlin
7292938520 [kcmkwin/compositing] Improve initialization of kdeclarative
We need kdeclarative for i18n support. This needs to be done before we
load the source. By that we don't need to import Plasma.Core which isn't
used by the views at all.

Also we don't need to link twice against declarative.
2014-05-26 11:34:40 +02:00
Martin Gräßlin
39d7ac71c2 [kcmkwin/compositing] Accept StrongFocus on the QuickView's WidgetContainer
This ensures that we can tab to the UI written in QtQuick. Unfortunately
it doesn't get initial focus, which seems to be a general problem of
KCMShell (QWidget based KCMs also do not get focus) and it's not possible
to tab out of quick ui again.

BUG: 335195
2014-05-23 11:20:45 +02:00
Martin Gräßlin
30dd9b7820 Fix the initial size of the KCMs
Both KCMs had a hard coded default which is obviously bad. Instead we
now calculate a useable implicitWidth and implicitHeight and use this
as the minimum size for the KCM. Which means we need also track changes
to these two root object properties and update the QWidget container
accordingly.

BUG: 332518
BUG: 332519
REVIEW: 117079
2014-04-03 07:23:17 +02:00
Martin Gräßlin
74d9185f49 Split into one KCM for Desktop Effects and one for Compositing
Let's try getting the KCM a little bit less scary by properly
hiding everything the user doesn't have to care about. The prominent
desktop effects KCM only contains the list of all the effects which
can be configured and nothing else. Only exception is the disabled
check after failed GL to make this easier for the user.

All the "advanced" settings are moved into a new KCM called
"Compositing" which is put under the hardware component in
systemsettings. This contains all advanced settings including
* whether compositing is enabled at all
* backend
* animation speeed
* scale filter
* unredirect fullscreen
* color correction

REVIEW: 116648
2014-04-03 07:23:16 +02:00
Martin Gräßlin
b1429c0d60 Adjust to KDeclarative changes 2014-04-03 07:23:15 +02:00
Martin Gräßlin
6006a91e8a Invoke the reinit Compositor signal when the advanced options changed
Therefore we track whether the options got changed and if they did
we emit the reinit signal once the configuration is saved.
2014-04-03 07:23:15 +02:00
Martin Gräßlin
450888df50 Fix connection to KWin through DBus
Not 100 % perfect yet as KWin needs to have the compositor connect
to the signals.
2014-04-03 07:23:15 +02:00
Martin Gräßlin
f19acce59d Implement the KCModule::defaults 2014-04-03 07:23:15 +02:00
Martin Gräßlin
e3c944feb2 Implement KCModule::load 2014-04-03 07:23:15 +02:00
Martin Gräßlin
891af9cf54 Handling saving the changes of the KCM
Save method added to the EffectView which invokes the specific methods
on the effect model and compositing object.
2014-04-03 07:23:15 +02:00
Martin Gräßlin
aa39bb192f Connect changed from QML to the C++ side
Connected in the view and further emited as a signal our KCM
connects to.
2014-04-03 07:23:15 +02:00
Martin Gräßlin
7372a7f784 KWinCompositing becomes a KCModule
Instead of a binary it's a library installed as a plugin. main.cpp
defines the KCModule which just loads the EffectView into a widget
container.
2014-04-03 07:23:14 +02:00
Martin Gräßlin
dd23f40c81 Clean up CMakeLists.txt
Find only required modules and not everything kde-workspace used to find.
Also properly set the target link targets.
2014-04-03 07:23:14 +02:00
Antonis Tsiapaliokas
a336e51867 Add missing i18n 2014-04-03 07:23:14 +02:00
Antonis Tsiapaliokas
578f43292b Fix copyright 2014-04-03 07:23:14 +02:00
Antonis Tsiapaliokas
3ab4e1a84a make it build and fix linking 2014-04-03 07:23:13 +02:00
Antonis Tsiapaliokas
2f30411106 Make our QAbstractListModel smarter, give better names to
the enumenators.
Rename struct Effect to EffectData
2014-04-03 07:23:13 +02:00
Antonis Tsiapaliokas
2431da8222 Buttons are enable only when they have something to do 2014-04-03 07:23:13 +02:00
Antonis Tsiapaliokas
1d6dee92fc Initial commit 2014-04-03 07:23:12 +02:00
Martin Gräßlin
5339d28389 [kwin] Drop old kwincompositing KCM
It's going to be replaced by kwin-compositing-kcm, see
https://projects.kde.org/projects/playground/base/kwin-compositing-kcm
2013-12-16 13:27:56 +01:00
Bhushan Shah
935851a2b5 kDebug -> qDebug in kwin 2013-11-01 17:00:41 +05:30
Anselmo L. S. Melo
d258759ac9 Port from KTemporaryFile to QTemporaryFile
REVIEW: 112742
2013-09-24 08:07:41 -03: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
Casian Andrei
0c20edb250 Enable color correction check box for the appropriate compositing types
REVIEW: 111055
2013-06-24 21:33:12 +03:00
Martin Gräßlin
0ccb774309 Fix Typo 2013-05-21 09:27:38 +02:00
Fredrik Höglund
f06990a7e7 kwin: Refactor the UI for compositing type selection
Remove the "Use OpenGL 2 shaders" checkbox, and add "OpenGL 2.0"
and "OpenGL 3.1" options in the compositing type combobox.
2013-05-08 18:33:01 +02:00
Yuri Chornoivan
e8806dfe56 Fix typo: stragtegy->strategy 2013-03-25 08:20:07 +02:00
Thomas Lübking
903c95dd52 add GUI config to select the swapstrategy
REVIEW: 109322
2013-03-24 22:26:48 +01:00
Martin Gräßlin
898e120be9 Extract messages from scripts and scripting module
Messages in scripts are written to kwin_scripts.pot, messages in
scripting are written to kwin_scripting.pot. The cataloges are loaded in
the configuration interfaces and in main kwin.

REVIEW: 108975
2013-03-04 10:29:25 +01:00
Thomas Lübking
36378925e7 Check max viewport and texture dimensions
REVIEW: 106917
2013-01-23 21:27:46 +01:00
Thomas Lübking
fa29b4141b fix dbus service registration/invocation
REVIEW: 108016
2013-01-02 19:05:11 +01:00
Thomas Lübking
c6d411d939 activate layout, no idea why doesn't happen implicitly
BUG: 311553
FIXED-IN: 4.10
REVIEW: 107851
2013-01-02 18:43:14 +01:00
Casian Andrei
01adbe6dc5 Implement color correction (per output)
Add an option to kcmcompositing in the 'Advanced' tab, to enable or
disable color correction. It is specified that it's experimental and it
needs Kolor Manager.

Before painting for a particular screen, ColorCorrection::setupForOutput
should be called.

A screen property is added for WindowPaintData.

In kwinglutils, The fragment shaders are intercepted before being
compiled and they get a couple of lines of code inserted in order to do
the color correction. This happens only when color correction is enabled, of
course.

For D-Bus communication with KolorServer, everything is async.

The implementation basically manages a set of color lookup tables for
different outputs and for different window regions. These are taken via
D-Bus. Each lookup table has around 700 KB.

This commit reintroduces the changes from the former merge with the
"color2" branch. In this form, it can be easily reverted.

REVIEW: 106141
2012-11-13 22:47:09 +02:00
Casian Andrei
a46d247702 Revert "Merge branch 'color2'"
This merge is incomplete and it does not include the review number of
the associated review request. It should have been pushed as a single
commit, because the merged commits were not intended to be published in
their form.

This reverts commit dcba90263069a221a5489b1915c5cf1ca39d090c, reversing
changes made to 50ae07525c7fde07794e7548c3d6e5a69cb1a89d.

Conflicts:
	kwin/scene_opengl.cpp
	kwin/scene_opengl.h
2012-11-13 22:19:32 +02:00
Kai-Uwe Behrmann
479be668d7 Merge branch 'color2'
Conflicts:
	kwin/libkwineffects/kwinglplatform.cpp
2012-11-07 23:54:18 +01:00
Martin Gräßlin
6417246358 Add GHNS support for Scripted KWin Effects
BUG: 296773
FIXED-IN: 4.10
REVIEW: 107051
2012-10-28 09:49:02 +01:00
Casian Andrei
a417888b0e Implement color correction support
The implementation consists of a class in libkwineffects.

There are some slight modifications in the compositor. Regions for
different outputs are drawn at different times.

Currently only per output color correction is implemented. However, the
grounds are prepared for implementing per window color correction
easily.

The ColorCorrection class needs to communicate via D-Bus with a KDED
module, KolorServer, which is a part of KolorManager.

The only visible part for the user consists of a check box in the
advanced tab for the compositing KCM.

The actual correction is done by injecting a piece of code in the
fragment shader, code that does a 3D lookup into a special color lookup
texture. The data for these textures is obtained from KolorServer. All
D-Bus calls are async.
2012-08-20 20:37:25 +03:00
Martin Gräßlin
961b5d0720 Fix compilation of kcmcompositing without XRender
Element had been removed from ui file with
2916352c0c366338c63a8a4a7bebe4e84a969f58
2012-05-25 18:31:33 +02:00
Frederik Schwarzer
6cce2d93af String casing fixes.
REVIEW: 104995
2012-05-19 14:40:51 +02:00
Martin Gräßlin
d14cf2da92 Show detailed information why an effect cannot be loaded
Effects can specify their minimum requirements in their
desktop file:
* OpenGL
* OpenGL 2 (GLSL required)
* Shaders (either ARB or OpenGL 2)

The configuration module uses this information in combination
with which backend KWin is currently using. So if e.g. OpenGL
is used and an effect requires OpenGL 2 a detailed error
message can be showed that OpenGL 2 is required.

BUG: 209213
FIXED-IN: 4.9.0
REVIEW: 104847
2012-05-15 18:02:57 +02:00
Thomas Lübking
75b6a04732 add delay before reinit confirmation
required to mitigate false positives due to threaded init code

REVIEW: 104799
2012-04-30 22:37:40 +02:00
Martin Gräßlin
6919b4dc94 Drop CompositingPrefs from Compositing KCM
Instead of getting the information from CompositingPrefs
the running KWin instance is queried through D-Bus.
In general the running KWin should have more information
about whether Compositing will work or not.

This means the kcm no longer has to link OpenGL.

REVIEW: 104753
2012-04-29 21:50:09 +02:00
Martin Gräßlin
23708521c6 Make GLVSync a complete user controlled variable
There is no need to have it driver specific any more.
All drivers seem to support it (only Intel had been
opt-ed out without any apparent reason shown in commit log).

This was the last driver specific setting which means that
the method applyDriverSpecificSettings() got dropped from
CompositingPrefs.
2012-04-29 21:44:35 +02:00
Martin Gräßlin
bcbbf3c5a8 Drop recommendCompositing from CompositingPrefs
It's always true which means it's no longer needed.
2012-04-29 21:44:34 +02:00
Thomas Lübking
19fceb5216 add GUI config for graphicssystem
REVIEW: 103431
2012-01-24 22:42:49 +01:00
Martin Gräßlin
95430bc741 Remove window switching combo box from compositing UI
Reduces duplication of settings in different areas and was only
providing a small subset of the possible window switching capabilities.
With BoxSwitch being possible to be rendered as a "normal" window
switcher it does not make much sense anyway.
2011-11-10 21:29:45 +01:00
Montel Laurent
62c5a5e276 normalize signal/slots 2011-08-17 23:51:55 +02:00
Martin Gräßlin
987bc837d9 Remove define KWIN_HAVE_OPENGL_COMPOSITING
Due to changes in build system we have always either OpenGL or OpenGL ES.
This allows to remove the KWIN_HAVE_OPENGL_COMPOSITING define. In the
effects the define is kept as KWIN_HAVE_OPENGL which can be used in
future to build also an XRender only effect system.
2011-08-13 16:46:43 +02:00