12799 Commits (c59f911487a7325a1aaf29c9003990c84ff58ba3)
 

Author SHA1 Message Date
Martin Gräßlin f78ff8eaa5 Do not emit DecorationSettings::alphaChannelSupportedChanged on tear down
The Compositor is destroyed before the Client and Decorations are
destroyed on shutdown. This meant the Decorations reacted needlessly
on the alpha channel supported. E.g. Aurorae recreated the Decoration
and most likely crashed in Qt.

With this change the signal gets disconnected and the Decorations
just don't do anything.
10 years ago
Martin Gräßlin c815775a0e [aurorae] Better specify y value of titleBar
It uses the borderBottom now to have at least an as large resize
border as at the bottom. This still needs improvement.
10 years ago
Martin Gräßlin 13dcafab42 Delay decoration repaint to end of event cycle on create
When a Client gets created the ::createDecoration method is invoked
from ::manage which is called before the Client is added to the
ClientList in Workspace. Thus processing the update fails in the
DecorationBridge as it cannot find the Client.

By delaying to the end of the event cycle we can be sure that the
Client is completely managed and that the scheduled repaint doesn't
fail.

This fixes the missing repaint when a Client starts as inactive.
10 years ago
Martin Gräßlin ac664d8455 Delete libkdecorations
Not used anywhere in kwin any more.
10 years ago
Martin Gräßlin 63695e6fc3 Remove unused imports 10 years ago
Martin Gräßlin 0646c58fe2 [kcmkwin/kwindecoration] Exclude buttons.cpp and configdialog.cpp from build
With that we should not have anything pulling in kdecoration.h
10 years ago
Martin Gräßlin d81e5697bf Ensure that the X11Renderer doesn't render after reparente to Deleted 10 years ago
Martin Gräßlin 4c9744fe8e Drop dependency on kdecoration.h 10 years ago
Martin Gräßlin 3d9a035312 Move MaximizeMode from KDecorationDefines to utils.h
Unfortunately it cannot be a enum defined in Client as client.h
depends on rules.h and with it in Client rules.h would depend on
client.h.
10 years ago
Martin Gräßlin 50019b4a31 Drop kdecoration.h include from placement.cpp 10 years ago
Martin Gräßlin 763a976c39 Drop kdecoration.h include from tabgroup.h 10 years ago
Martin Gräßlin 1747fde18b Toplevel does not inherit from KDecorationDefines any more
As an intermediate step Client inherits from KDecorationDefines.
10 years ago
Martin Gräßlin 6abf115d22 Drop kdecoration.h include from options.h 10 years ago
Martin Gräßlin d4e2f19ef0 Workspace does not need to inherit from KDecorationDefines 10 years ago
Martin Gräßlin fa4332754c Move Position from KDecorationDefines to Client 10 years ago
Martin Gräßlin e38d56b0dd Move QuickTileMode from KDecorationDefines to Client 10 years ago
Martin Gräßlin d4bf3602ce Move WindowOperation enum to Options
With this Options no longer needs to inherit from KDecorationDefines.
10 years ago
Martin Gräßlin b9fb7df15a Do not use KDecorationDefines in Aurorae 10 years ago
Martin Gräßlin f5c305bf64 Do not include kdecoration.h in plastik decoration plugin 10 years ago
Martin Gräßlin 4188736bc4 Stop building libkdecorations
Some defines are still used, so it's not yet deleted.
10 years ago
Martin Gräßlin 93f414a070 Options no longer inherits from KDecorationOptions 10 years ago
Martin Gräßlin cb38028d98 Move maximize button click config to Options
In order to drop dependency on KDecorationOptions.
10 years ago
Martin Gräßlin c2e53b9a2f Merge branch 'kdecorations2'
Conflicts:
	effects.cpp
	paintredirector.cpp
10 years ago
Martin Gräßlin 106e595709 DecorationSettings provides QVector for decorationButtons 10 years ago
Martin Gräßlin 40ce3e4ce3 [autotests] Give Xephyr more time to startup
The test is flaky during the wait for Xephyr. Giving it more time should
hopefully make it more reliable.

The better way would be to switch to the command line argument
-displayfd pipeFd

unfortunately the Xephyr on the CI system does not yet support this
command line argument.
10 years ago
Martin Gräßlin 027a7a1646 [kdecoration2] Decoration::shadow returns QSharedPointer
Adjust all components to use the QSharedPointer. Aurorae obviously has
to create a QSharedPointer, Shadow holds a QSharedPointer for the
DecorationShadow (advantage: is kept when the Decoration is destroyed),
and the KCM needs to add a property on PreviewItem to get access to the
Shadow. It's no longer a Q_PROPERTY on Decoration and we cannot re-add
it as a dynamic property (cannot be read from QML side).
10 years ago
Martin Gräßlin 6bdd0e96f6 [kdecoration] Decoration::client returns a QWeakPointer
In aurorae a wrapper property is added.
10 years ago
Martin Gräßlin d1bf38e92c [kdecoration2] Detect double clicks on the decoration title bar
No longer handled by the Decoration.
10 years ago
Martin Gräßlin 0efa9d9c73 [kdecoration2] Decoration does not provide titleBarWheelEvent any more
Instead KWin needs to determine by itself whether it should act on the
wheel event. The Decoration will set it to accepted if it handled it.
10 years ago
Martin Gräßlin 0cc86656c9 DecorationButtonType::QuickHelp -> DecorationButtonType::ContextHelp 10 years ago
Martin Gräßlin 211834edcc [kdecoration] ::paint uses QRect instead of QRegion 10 years ago
Thomas Lübking 50cbe810f5 don't access array to check whether ptr is nullptr
Also unify with the below check whether array[0] is 0
(Was same condition and same branch)

BUG: 341010
10 years ago
Thomas Lübking 7747a38189 step into the focus chain at the beginning
if the index is 0, we close the circle, but if the
index is -1 (invalid) we're "somewhere" and step
into the focus chain - reasonably at the beginning

BUG: 340594
REVIEW: 121024
10 years ago
Thomas Lübking b26ef9302a don't restore unrestorable window sizes on Q'unmax
BUG: 340600
REVIEW: 121022
10 years ago
Thomas Lübking ec8f7e1fac ensure disjunct screenedges on overlapping screens
If two or more screens overlap (partially or fully)
we must not create double edges since kwin would
trigger both - since they've the same actions bound
(for sure) the action will called twice (so either
eg. toggle or skip one VD etc.)

BUG: 338381
REVIEW: 120060
10 years ago
Martin Gräßlin 66df3eefdf Cleanup: reduce usage of QDesktopWidget 10 years ago
Martin Gräßlin bf4ba54647 Remove displayWidth and displayHeight from the compositor
Instead of getting size from displayWidth() and displayHeight() use
the information we have from Screens. This means there is only one
place to have the information and by that we can ensure that all
components use the same data to rely on. displayWidth/displayHeight
seem to provide the wrong information when unplugging an output
without disabling the output. This results in rendering artefacts.
But KWin::Screens has the correct information available.
10 years ago
Martin Gräßlin cc98c5d9c7 Use screens()->geometry() in Workspace::desktopResized
It used to get the individual screen geometries from QDesktopWidget.
We don't need to go through QDesktopWidget any more as Screens
contains all the information we need in a more reliable way.
10 years ago
Martin Gräßlin 2eb876743c [screens] Replace DesktopWidgetScreens by XRandRScreens
A new implementation of the Screens interface is added which uses XRandR
directly instead of relying on QDesktopWidget. The implementation is
provided in a new implementation file screens_xrandr.cpp.

XRandRScreens comes with a unit test. Unfortunately it's rather difficult
to provide a proper unit test against XRandR. Xvfb (which is obviously
used on the CI system) doesn't provide the XRandR extension. Also on a
"normal" developer system one would not want to just execute the test as
the results are not predictable (number of available outputs?) and the
test would mess up the setup resulting in nobody wanting to execute the
test.

As a solution to both problems the unit test starts Xephyr as a nested
X server. This allows to have at least some limited tests against XRandR.
Nevertheless there are a few things which I was not able to test:
* multiple outputs
* no output at all

The nested X Server approach makes the interaction rather complex. Qt
opens it's connection against the main X Server thus QX11Info provides
a wrong connection and also KWin::connection() which is heavily used by
xcbutils and thus all the RandR wrappers have the wrong connection. To
circumvent this problem the test is GUILESS. In case it would call into
any code using QX11Info, it would probably either runtime fail or crash.

REVIEW: 117614
10 years ago
Martin Gräßlin 6d64113ed4 Do not include utils.h in xcbutils.h
Only needed for ScopedCPointer which can be defined in both utils and
xcbutils.h.

Not having utils.h in xcbutils.h makes it easier to have unit tests use
xcbutils.h as it removes the dependencies.
10 years ago
Fredrik Höglund 9d01ed16be Remove GLTexturePrivate::bind()/unbind()
These virtual methods are not reimplemented anywhere.
10 years ago
Fredrik Höglund 59b5746351 Mark SceneOpenGL::Texture::discard() as override final 10 years ago
Fredrik Höglund e47d8671e9 De-virtualize SceneOpenGL::Texture::load()
SceneOpenGL::Texture is not subclassed anywhere so there is no reason
for this function to be virtual.
10 years ago
Fredrik Höglund 4b9448db5e Inline GLTexture::load(QImage) in the constructor
This is the only place where it is called.

There was also no need for this function to be virtual since it's not
reimplemented anywhere.

This also fixes the GLTexturePrivate being created only to be
immediately deleted and replaced by a new GLTexturePrivate when the
GLTexture(QImage) constructor was used.

With this change the structure of the GLTexture effectively becomes
immutable to the outside world; the contents of the texture images can
change, but the texture images themselves cannot be reallocated.
10 years ago
Fredrik Höglund 9c7720abca Remove GLTexture::load(QPixmap) and load(QString)
These methods are only called from the GLTexture constructors,
so inline them there.
10 years ago
Fredrik Höglund fa52af4765 Remove SceneOpenGL::createTexture(QPixmap)
...and associated code.

It is no longer used.
10 years ago
Fredrik Höglund 34f1408134 Make the EffectFrame textures regular GLTextures
There is valid reason for these textures to be Scene::Texture's.
10 years ago
Fredrik Höglund 383a5ac319 Remove GLTexturePrivate::convertToGLFormat()
QImage::Format_RGBA8888_Premultiplied is the equivalent of
GL_RGBA/GL_UNSIGNED_BYTE, so use QImage::convertToFormat()
instead.

This commit also makes the texture upload code work correctly
on big-endian systems.
10 years ago
Fredrik Höglund 6ac7371113 Remove most calls to checkGLError()
...and rely on KHR_debug/GL_ARB_debug_output instead.
10 years ago
Fredrik Höglund c0deadfaad Add support for KHR_debug
Register a callback function for debug output when KHR_debug or
ARB_debug_output is supported.

Only error messages and warnings about undefined behavior are
enabled in release builds, while all debug messages are enabled
in debug builds.
10 years ago