Commit Graph

162 Commits (a1c76f4df2447cf7ea1e316437f2ef342f6080a4)

Author SHA1 Message Date
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
Thomas Lübking 03d782fa73 scripted title manipulation / stripping
REVIEW: 106896
BUG: 308995
2012-11-09 00:37:34 +01:00
Kai-Uwe Behrmann 479be668d7 Merge branch 'color2'
Conflicts:
	kwin/libkwineffects/kwinglplatform.cpp
2012-11-07 23:54:18 +01:00
Thomas Lübking 0e69bdf0ed add ElectricBorderCornerRatio setting [0,1]
REVIEW: 106509
CCBUG: 308993
2012-10-25 20:16:53 +02:00
Casian Andrei 8341d4406b Merge remote-tracking branch 'origin/master' into color2
Results in cleaner changes.
Put all the color correction stuff from SceneOpenGL in SceneOpenGL2.

Conflicts:
	kwin/eglonxbackend.cpp
	kwin/glxbackend.cpp
	kwin/scene.h
	kwin/scene_opengl.cpp
	kwin/scene_opengl.h
2012-09-23 11:57:38 +03:00
Martin Gräßlin 5a6d9400b2 Split SceneOpenGL into a concrete SceneOpenGL1 and SceneOpenGL2
SceneOpenGL turns into an abstract class with two concrete subclasses:
* SceneOpenGL1
* SceneOpenGL2

It provides a factory method which first creates either the GLX or EGL
backend which is passed to a static supported() method in the concrete
sub classes. These method can test whether the backend is sufficient to
be used for the OpenGL version in question. E.g. the OpenGL 2 scene
checks whether the context is direct.

The actual rendering is moved into the subclasses with specific OpenGL 1
and OpenGL 2 code. This should make the code more readable and requires
less checks whether a Shader is bound. This is now known through the
Scene: the OpenGL1 scene will never have a shader bound, the OpenGL2 scene
will always have a shader bound.

To make this more reliable the ShaderManager is extended by a disable
method used by SceneOpenGL1 to ensure that the ShaderManager will never
be used. This also obsoletes the need to read the KWin configuration
whether legacy GL is enabled. The check is moved into the supported
method of the OpenGL2 scene.

REVIEW: 106357
2012-09-16 21:28:11 +02:00
Casian Andrei 7d331ea7ff CC: Rename "glColorCorrection" property to "colorCorrected" 2012-08-27 15:29:59 +03: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 a394fade64 Remove Tiling support from KWin
As discussed on the mailinglist [1] the tiling support is
removed from KWin. The main reasons for this step are:
* it is unmaintained
* it is a mode not used by any of the core KWin team
* original developer said at Akademy 2012 that he is not
  interested in picking up the work again
* tiling has quite some bugs, e.g. multi screen not supported
* is conflicting with other concepts in KWin, e.g. activities

There is ongoing work to get tiling supported through a KWin
script, which is a preferred way as it does not influence the
existing C++ code base.

[1] http://lists.kde.org/?l=kwin&m=133149673110558&w=2
BUG: 303090
FIXED-IN: 4.10
REVIEW: 105546
2012-07-14 11:18:06 +02:00
Thomas Lübking fc665106c9 Swap vsync order, trade in 1frame lag
REVIEW: 103058
2012-05-17 11:41:26 +02:00
Martin Gräßlin d6540c8392 Remove strict binding from compositing prefs
Strict binding follows the driver (GLPlattform) unless
the user has a config value specified in the kwinrc.

For this a new property is added to Options to indicate
whether strict binding is user defined or follows the
driver. In case of driver the strict binding option is
set when OpenGL compositor starts up.
2012-04-29 21:44:34 +02:00
Martin Gräßlin 3ed63d4c45 Reparse Configuration at startup asynchronous
Options loading is split into three parts:
* reparse configuration
* loading of non-compositing related options
* loading of composited related options not needing CompositingPrefs

At startup the reparsing of configuration is done through a Thread
to gain a little bit of less waiting.

Before something else accesses the KConfig for the first time we
wait for the thread to finish and perform the other two loading
operations of Options.

The settings depending on CompositingPrefs will only be invoked
if a compositor is going to be needed.

REVIEW: 104562
2012-04-22 22:29:07 +02:00
Martin Gräßlin 5c71a75e8e Use setters for parsing the config options
Use setter when changing a value to ensure that signal gets emitted
and the option dependencies are applied.
Also use the default values as provided by the static getters.

REVIEW: 104561
2012-04-16 18:08:25 +02:00
Martin Gräßlin 7b45ff9a73 Static getters for Options default values
For each option a static getter is introduced returning the
default value.

Some GL compositing related options do not have a proper default
value but depend on the actual GL driver. Sane default values are
assumed for those options.
2012-04-16 18:06:25 +02:00
Martin Gräßlin f7bcdaa6dd Introduce setters and change signals for all KWin Options
For most of the properties defined in Options a setter and dedicated
change signal is added.
2012-04-16 18:06:25 +02:00
Thomas Lübking eb83686d56 [Janitorial] Remove legacy "rules" to ignore position request and focus stealing prevention
REVIEW: 104274
2012-03-21 22:32:33 +01:00
Martin Gräßlin 551ad4d4ff KWin::Options becomes a QObject and provides properties
This allows to inject the options into KWin scripts.

REVIEW: 104036
2012-02-27 19:34:13 +01:00
Martin Gräßlin ca663c3749 Constify getter methods in KWin::Options 2012-02-27 19:31:58 +01:00
Martin Gräßlin 212908ee88 Refactoring of KWin::Options: getter methods instead of public variables 2012-02-27 19:31:58 +01:00
Martin Gräßlin 00913cc4d6 Drop unused options variable 2012-02-27 19:28:48 +01:00
Thomas Lübking 85635dd485 fix tabbing
BUG: 290959
BUG: 265160
BUG: 229292
BUG: 238279
BUG: 290758
BUG: 222831
BUG: 278275
BUG: 245747
BUG: 230000

BUG: 253697
BUG: 230570
BUG: 265977
BUG: 225337
BUG: 225339

REVIEW: 103855
2012-02-11 16:30:22 +01:00
Thomas Lübking bf88ec09ac Revert "fix tabbing"
pushed out of branch, not master - leading to absent revision, found hash collision??

This reverts commit 94b2ad7b85801e37e2df4671cdc4f26b6d7e5506.
2012-02-11 16:29:14 +01:00
Thomas Lübking d245035a17 fix tabbing
BUG: 290959
BUG: 265160
BUG: 229292
BUG: 238279
BUG: 290758
BUG: 222831
BUG: 278275
BUG: 245747
BUG: 230000

BUG: 253697
BUG: 230570
BUG: 265977
BUG: 225337
BUG: 225339

REVIEW: 103855
2012-02-11 16:01:41 +01:00
Martin Gräßlin 7c6155a865 Drop xinerama related options
Behavior is now like all xinerama related options are enabled.
There seems to be no valid reasons to run multi screen without
xinerama support and even if a user would wish to do so she can
just disable xinerama in xorg.conf.

Furhtermore thanks to KWin scripting it is possible to achieve the
behavior as it used to be with the options disabled. E.g. it is
possible to span a window in fullscreen mode over all screens.

This change is in accordance to the discussion on kwin and plasma
mailinglists:
http://mail.kde.org/pipermail/plasma-devel/2012-January/018542.html
2012-02-09 16:52:39 +01:00
Thomas Lübking 117eb46684 add mouse preference against focus chain
there's currently no GUI config item, use
   kwriteconfig --file kwinrc --group Windows --key NextFocusPrefersMouse true
   qdbus org.kde.kwin /KWin reconfigure

BUG: 159989
CCBUG: 80897
FIXED-IN: 4.8
2011-12-01 13:13:13 +01:00
Thomas Lübking 6c934998a5 don't request focus by mouse events in the current event cycle
BUG: 279356
BUG: 286116
REVIEW: 103284
2011-11-29 21:11:11 +01:00
Arthur Arlt 25654f25b8 Removing TopMenu
Since the funtionality of TopMenu did no longer work in KDE4 this feature was
removed from Workspace. Every reference to it was removed as well as commentaries
and documentation.

REVIEW: 101485
2011-06-24 12:27:56 +02:00
Martin Gräßlin 12d3b354fc Remove drawbound move/resize functionality
Drawbound was nowadays only used when compositing is disabled.
For the composited case, the drawbound was replaced by the resize
effect and in fact we should always just use the resize effect.

REVIEW: 101411
2011-06-23 12:15:54 +02:00
Thomas Lübking 0c5d47f3ae unify composite activation, 'Enable' only controls initial state 2011-03-06 22:35:13 +01:00
Martin Gräßlin 0a7e48f7aa KWin uses kdelibs coding style. 2011-01-31 20:07:03 +01:00
Martin Gräßlin fe069f188b Option AltTabStyle not used anymore.
This should have been removed together with the tabbox rewrite.
2011-01-30 14:24:48 +01:00
Martin Gräßlin 2f56415a21 Removing SHM and Fallback OpenGL Compositing modes.
Our primary target is Texture From Pixmap and it is supported
by all important drivers nowadays. If a driver is not able to
support TFP using OpenGL at all is probably no good idea and
XRender is more suited.
2011-01-30 14:24:48 +01:00
Thomas Lübking e2dcfff601 commiting http://svn.reviewboard.kde.org/r/6120/#review9304
this should improve v'syncing, maybe v'synced "smoothness"
remaining and exposed issue are "dirty textures" w/o damage events (see the requst description)
can be diminished by increasing MaxFPS above the fastest update (or shadowed below the slowest one)
CCBUG: 258971

svn path=/trunk/KDE/kdebase/workspace/; revision=1207577
2010-12-18 16:51:43 +00:00
Nikhil Marathe b87fa7ef41 tilingLayout is now an enum rather than an int faking as an enum :-)
svn path=/trunk/KDE/kdebase/workspace/; revision=1123125
2010-05-05 11:44:04 +00:00
Nikhil Marathe 5fc7e93d69 Tiling is here!
This commit merges the kwin-tiling branch. Ideally it shouldn't break anything and add a few features ;-)
It was applied as a patch. Do not attempt to merge the branch directly, it has a few issues.
This feature is currently experimental, although it hasn't crashed in quite a long time. It lacks some features and probably leaks some memory. Fixes will be on the way.

Season Of KDE 2009 project by Nikhil Marathe

svn path=/trunk/KDE/kdebase/workspace/; revision=1118677
2010-04-25 16:43:14 +00:00
Lucas Murray 8960c552d2 Remove OpenGL driver whitelist; Add protection against crashy glXQuery
functions and share the value with the KCM; Fallback to XRender
compositing if OpenGL fails to work correctly; Rearrange setting order
in options.h slightly and fix variable names

svn path=/trunk/KDE/kdebase/workspace/; revision=1079919
2010-01-25 10:02:08 +00:00
Andreas Hartmetz eab4dc6ed4 fix the build (constness error) by implementing a suggestion from comments
svn path=/trunk/KDE/kdebase/workspace/; revision=1056343
2009-11-29 22:11:49 +00:00
Lucas Murray 78d1aed9f7 Add setting to hide inactive tabs from the taskbar but hide it in the UI
for now as: 1) It causes taskbar items to reshuffle, and 2) Switching
the setting during a session currently requires applications to be
restarted as well for their skip taskbar status to be reset.

svn path=/trunk/KDE/kdebase/workspace/; revision=1050472
2009-11-17 11:25:03 +00:00
Lucas Murray 3855b9253b Added global setting to allow opening automatically grouped windows in
the background.

svn path=/trunk/KDE/kdebase/workspace/; revision=1050313
2009-11-17 07:51:55 +00:00
Lucas Murray 00e131a1a5 Allow window tabbing titlebar actions to be configurable; Set default
middle-click titlebar action to tab drag; Fix KCM config file corruption
caused by r1015273.
BUG: 214898

svn path=/trunk/KDE/kdebase/workspace/; revision=1050309
2009-11-17 07:17:49 +00:00
Lucas Murray 535737e1fe Add "automatically group identical windows" feature to window tabbing.
svn path=/trunk/KDE/kdebase/workspace/; revision=1049953
2009-11-16 10:09:03 +00:00
Lucas Murray 72c3a553ca Add ability to switch the active window tab to the left/right by
scrolling on the titlebar or when using the WM modifier key.

svn path=/trunk/KDE/kdebase/workspace/; revision=1049547
2009-11-15 12:34:46 +00:00
Marco Martin 154b0296a2 add a new (hidden for now) option: hide (and delete) the window borders
when the window is maximized, restoring them wen it's unmaximized. will
be used for small screen setups


svn path=/trunk/KDE/kdebase/workspace/; revision=1025694
2009-09-19 12:48:28 +00:00
Martin Gräßlin 9e3484e2f0 Adding new option to disable the legacy fullscreen mode (borderless, not netwm compliant windows with screen geometry).
It is disabled by default, but if it causes problems we will enable it again. In that case the "3rd party" (netbook shell) should set the option.
BUG: 206789
CC-MAIL: notmart@gmail.com

svn path=/trunk/KDE/kdebase/workspace/; revision=1021309
2009-09-08 20:19:20 +00:00
Martin Gräßlin 53aaaf471d Adding a new option to disable the cursor pushback for active screen edges.
I haven't added it to the UI as the screen edges kcm is already a little bit cluttered with complicated options.
So if you want to disable the pushback add option "ElectricBorderPushbackPixels" to section [Windows].
FEATURE: 198225

svn path=/trunk/KDE/kdebase/workspace/; revision=1021306
2009-09-08 20:01:16 +00:00
Martin Gräßlin 754f5d0829 Quick maximize and tiling when moving a window to the left/right or top screen edge.
Top screen edge (un)maximizes. Left screen edge sets window to left half of screen geometry, right edge to other half.

svn path=/trunk/KDE/kdebase/workspace/; revision=1021305
2009-09-08 20:01:08 +00:00
Lucas Murray c3a07890f5 Add close window ability to customizable title bar mouse button actions.
Patch by Thomas Lundgaard.
CCMAIL: thomaslundgaard@gmail.com

svn path=/trunk/KDE/kdebase/workspace/; revision=1015273
2009-08-25 04:10:11 +00:00
A. Lynn Spehr 2893eac8fe Added setting to control whether scrolling on a background window focuses it.
Patch by Alex Danila. Approved by lmurray. 
BUG: 164261

svn path=/trunk/KDE/kdebase/workspace/; revision=964140
2009-05-06 06:38:54 +00:00
Lucas Murray 0ffcc70c18 Add support for hardcoded non-KWin-related active screen edge actions,
first to be added is one to display the Plasma dashboard. Implemented
the "trigger cooldown" option. Fixed a few edge action conflicts such
as forcing desktop switches when moving windows and the like.
BUG: 170393

svn path=/trunk/KDE/kdebase/workspace/; revision=933166
2009-02-28 08:33:16 +00:00