Commit Graph

12261 Commits (c654dd4ff12beb6941394b1e5530c846a1378f1d)

Author SHA1 Message Date
Martin Gräßlin 32db9c109f [kwin] Add new kwineffects KCM to the KWin config center 2014-03-10 14:55:04 +01:00
Martin Gräßlin 25b20c03fc [kwin] Drop Options::defaultGlDirect
Unused.
2014-03-10 09:24:50 +01:00
Martin Gräßlin 22fe6a2857 [kwin] Provide composited outline as QML instead of hand drawn FrameSvg
In order to get all our UI being written in QML, the Outline for
compositing is ported to QtQuick. It creates a QQmlContext and
QQmlComponent and loads the (currently hardcoded) qml file. The context
gets to properties exported: outline. The outline property allows the qml
to get the geometry it should use. The QQmlEngine is used from Scripting
thus all general scripting properties are exported (e.g. workspace).

The qml script is expected to create a QQuickWindow as it's root item
and style it.

The qml file is stored in a new qml subdirectory. The idea is that each
of the qml types we have gets an own directory there and for each
implementation there should be a further subdirectory.

Thus we have outline/plasma/ with outline being the type and plasma
being the implementation. But at the moment the script location is still
hardcoded.

REVIEW: 116123
2014-03-10 09:16:16 +01:00
Martin Gräßlin 869c087e21 [kwin] Use QQmlEngine from Scripting in TabBox
Instead of having it's own QQmlEngine TabBox just uses the newly
exposed engine from Scripting and creates a new context for it's
own usage.

REVIEW: 116565
2014-03-10 09:09:01 +01:00
Martin Gräßlin adf485c261 [kwin] Share QQmlEngine between all declarative KWin Scripts
Instead of having each declarative script create it's own qml engine
there is one hold by the Scripting singleton. The engine's root context
gets populated in Scripting and each script just gets a new child
context. Thus also the WorkspaceWrapper instance is shared between the
declarative scripts.
2014-03-10 09:08:38 +01:00
Martin Gräßlin c7d986c7fe [kwin] Remove the legacy OpenGL 1 compositing backend
KWin already has a de facto OpenGL 2 dependency through QML. Combined
with the fact that the OpenGL 1 backend is basically unmaintained and
also unused, it's better to remove it for the new major release.

This change includes:
 * Removal of cmake option KWIN_BUILD_OPENGL_1_COMPOSITING
 * Removal of KWIN_HAVE_OPENGL_1 compile option and all code
   ifdef'ed with it (partially removal of if-else constructs)
 * Removal of CompositingType::OpenGL1Compositing (flags are kept
   as a core flag should get introduced)
 * Driver recommendation for OpenGL1Compositing changed to XRender
   (should be evaluated whether the drivers can provide GL2)
 * Removal of configuration option "GLLegacy"
 * Removal of fooMatrix function in kwinglutils
 * Removal of ARBBlurShader
 * Removal of legacy code path in GLVertexBuffer
 * Removal of GLShaderManager::disable
 * if-blocks with ShaderManager::instance()->isValid() removed

REVIEW: 116042
2014-03-10 08:59:11 +01:00
Martin Gräßlin 72882f6aba [kwin] Add sanity checks for the QPA plugin
KWin requires the xcb plugin otherwise KWin crashes when the first
xcb/xlib code is called. First KWin tries to set the QT_QPA_PLATFORM
to "xcb", but that doesn't protect against the command line switch.

Thus KWin also verifies that after constructing the QGuiApplication
the platform name is set to xcb, if not it exits gracefully with a
useful error message instead a crash.

To make that work the KWinSelectionOwner has to be changed to a
pointer and be delayed constructed, otherwise the crash already happens
in the KSelectionOwner.

Furthermore a small sanity check on the plugin is performed by checking
whether KWin can get the XDisplay from the QPA. If not it means that the
QPA plugin was compiled with -no-xcb-xlib which KWin doesn't support, it
still uses XLib at various places. If KWin doesn't get the Display, it
exits gracefully with a clear error message.

CCBUG: 331880
REVIEW: 116669
2014-03-10 08:41:53 +01:00
l10n daemon script fbd985ae3d SVN_SILENT made messages (.desktop file) 2014-03-10 07:33:17 +00:00
Martin Gräßlin 0d6dfd83a1 Drop workaround for QTBUG-34898
Fixed as of 91e2c5d749e38eed93e91b14151faa549e70080f in
qtdeclarative module. Part of at 5.2.1.
2014-03-08 14:41:12 +01:00
Martin Gräßlin f77fe3ebd9 [kwin] Install all DBus interfaces 2014-03-07 14:46:11 +01:00
Martin Gräßlin 3f0ff9b8d5 Migrate effects from displayWidth()/displayHeight() to virtualScreenSize()/virtualScreenGeometry()
Rational behind this change is that displayWidth and displayHeight are
X specific API calls in kwinglobals. For the future it's easier to only
rely on functionality which goes through the EffectsHandler API which
allows easier adjustments in KWin core.

displayWidth() and displayHeight() are only used to get the size or the
complete rect of all screens. This is also provided by:

effects->virtualScreenGeometry() or
effects->virtualScreenSize()

REVIEW: 116021
2014-03-07 08:01:44 +01:00
Martin Gräßlin b9e894bc4b Remove link to 4.0 release notes
http://techbase.kde.org/Projects/KWin/4.0-release-notes#Setting_up
is not really up to date any more and it's strange having 5.0 link to
the 4.0 release notes.

REVIEW: 116637
2014-03-07 07:46:15 +01:00
Martin Gräßlin 9d08d6799a Drop taskbar thumbnail effect
As Plasma components provide a thumbnail which does not use the
effect we can also remove it.

REVIEW: 115922
2014-03-05 14:45:36 +01:00
Martin Gräßlin 944ef39d83 [kwin/oxygen] Reorder variables in Oxygen::Factory
The _config is needed before the _helper gets created otherwise it
can end in a crash.
2014-03-05 14:07:49 +01:00
Martin Gräßlin 6b1f0b1fca [kwin] Introduce Screens::size and Screens::geometry
Screens provides a size which is constructed from the size of
the bounding geometry of all screens and provides an overload taking
an int to return the size of a specified screen. For geometry() a new
ovload is added without an argument, which is just a convenient wrapper
for QRect(QPoint(0, 0), size()).

Both new methods are exported to effects and scripting as new
properties there called virtualScreenSize and virtualScreenGeometry.

The (virtual) size gets cached in screens and is updated whenever the
count or geometry changes.

Construction of Screens is slightly changed by moving the init code
from ctor into a virtual method init(). Reason is that we ended in
a loop with accessing the singleton pointer before it was set.

REVIEW: 116114
2014-03-05 13:03:33 +01:00
Martin Gräßlin aee20b4a5a Hide the OnAllDesktops button if there is only one virtual desktop
In KCommonDecoration the OnAllDesktops button gets hidden or shown
depending on the number of desktops. For that KDecoration is extended
by a new property which delegates to the bridge to return whether
onAllDesktops is available. In KWin Core this is implemented using
the number of desktops.

FEATURE: 321611
FIXED-IN: 5.0.0
REVIEW: 116076
2014-03-05 13:02:32 +01:00
Martin Gräßlin a60d10bedd [kwin] Fix generate export header for kwinglesutils
If we build kwinglesutils we need to adjust the name of the generated
export macros to still be called kwinglutils.
2014-03-05 11:35:18 +01:00
Martin Gräßlin 4dff7888e3 [kwin] Drop build option to build without scripting
Scripting has proved it's point of being useful so it's time to turn it
into a mandatory part of KWin.

Also I start to use features provided by Scripting in more and more
parts of KWin core (e.g. sharing QQmlEngine) which makes it in the
long to complicated to have a build option and ifdefs for it.

REVIEW: 116587
2014-03-04 08:19:55 +01:00
Martin Gräßlin d8ca2403a1 [kwin] Drop the KWIN_MOBILE_EFFECTS build option
It's no longer needed as there won't be a KWin version specific to
Plasma Active. We want to have runtime adjustments of all parts in
the next version of Plasma.

REVIEW: 116563
2014-03-03 15:22:09 +01:00
Martin Gräßlin 0420a98cc0 [kwin] Fix crash on restart in kdecorationfactory
The assert which accesses the d-ptr should be called before we delete
the d-ptr otherwise we obviously crash.
2014-03-03 14:51:53 +01:00
Martin Gräßlin 59d91b9fd3 Use KPluginLoader to load the decoration config dialog
Straight forward update from KLibrary to KPluginLoader.

REVIEW: 115931
2014-03-03 14:20:08 +01:00
Martin Gräßlin b3d3c45149 Use KPluginLoader to load our decoration plugins
This simplifies the plugin loading. Decorations just have to use
K_PLUGIN_FACTORY to specify how the KDecorationFactory needs to be
created. The KWIN_DECORATION macro is adjusted to generate the
boiler plate code, but it now needs to specify the name for the
pluginfactory and the KDecorationFactory.

This also transits the decoration abi version check to use
K_EXPORT_PLUGIN_VERSION which also simplifies the loading.

As a result the complete canLoad handling in DecorationPlugins is
removed.

REVIEW: 115930
2014-03-03 13:55:52 +01:00
l10n daemon script b7a029619b SVN_SILENT made messages (.desktop file) 2014-03-03 04:35:02 +00:00
l10n daemon script aec46dab21 SVN_SILENT made messages (.desktop file) 2014-03-02 08:19:29 +00:00
l10n daemon script 5ba36afac1 SVN_SILENT made messages (.desktop file) 2014-03-02 05:38:11 +00:00
David Faure 022304c0db Oxygen: avoid calls to reparseConfiguration() on startup.
strace -e open kate |& grep -v NOENT | grep oxygenrc | wc -l
  went from 8 to 4
  (and when looking for kdeglobals, from 13 to 11)

There's still a lot of work to be done in that area...
(within KConfigSkeleton, and probably kdeplatformtheme)

REVIEW: 115964
2014-02-27 21:12:36 +01:00
Thomas Lübking 4ff958381d set highlightwindows inactive while screen locked
BUG: 331054
FIXED-IN: 4.11.7
2014-02-27 20:15:30 +01:00
Martin Gräßlin c130db39f2 [kwin] Add override to all virtual methods in EffectFrameImpl
In exchange virtual keyword is removed.
2014-02-27 12:10:18 +01:00
Martin Gräßlin 7532c0f54b [kwin] Add override to virtual methods in EffectWindow(Group)Impl
In exchange the virtual keyword is removed - we don't need both.
2014-02-27 12:07:41 +01:00
Martin Gräßlin 4359c17af2 [kwin] EffectsHandlerImpl::checkInputWindowStacking is not virtual 2014-02-27 12:04:15 +01:00
Martin Gräßlin f9dfb11144 [kwin] Drop EffectsHandlerImpl::displayWidth and EffectsHandlerImpl::displayHeight
Unused code.
2014-02-27 12:02:51 +01:00
Martin Gräßlin a129a8e63a [kwin] Add override to methods in EffectsHandlerImpl
In exchange the virtual keyword is removed.

Note: there are several virtual methods which do not override any
method in EffectsHandler.
2014-02-27 11:57:59 +01:00
Martin Gräßlin 3d6a77cdd7 [kwin/kcmdeco] Fix layout of button config dialog 2014-02-27 11:48:16 +01:00
Martin Gräßlin 7060386b22 Generate a KDecorationsConfig.cmake and install it
This simplifies building a decoration plugin. Now one can do:

find_package(KDecorations REQUIRED NO_MODULE)

to find the decorations library.

REVIEW: 116013
2014-02-27 11:25:54 +01:00
Martin Gräßlin f48aca47a5 [kwin] Use ui-file for ShortcutDialog
At the same time switching to QKeySequenceEdit for capturing the
shortcut. This allows to get rid of xmlgui.
2014-02-27 10:18:37 +01:00
Martin Gräßlin ed4a0d0319 Screenedge show support for Clients
This provides a new protocol intended to be used by auto-hiding panels
to make use of the centralized screen edges. To use it a Client can
set an X11 property of type _KDE_NET_WM_SCREEN_EDGE_SHOW to KWin.
As value it takes:
* 0: top edge
* 1: right edge
* 2: bottom edge
* 3: left edge

KWin will hide the Client (hide because unmap or minimize would break
it) and create an Edge. If that Edge gets triggered the Client is shown
again and the property gets deleted. If the Client doesn't border the
specified screen edge the Client gets shown immediately so that we
never end in a situation that we cannot unhide the auto-hidden panel
again. The exact process is described in the documentation of
ScreenEdges. The Client can request to be shown again by deleting the
property.

If KWin gets restarted the state is read from the property and it is
tried to create the edge as described.

As this is a KWin specific extension we need to discuss what it means
for Clients using this feature with other WMs: it does nothing. As
the Client gets hidden by KWin and not by the Client, it just doesn't
get hidden if the WM doesn't provide the feature. In case of an
auto-hiding panel this seems like a good solution given that we don't
want to hide it if we cannot unhide it. Of course there's the option
for the Client to provide that feature itself and if that's wanted we
would need to announce the feature in the _NET_SUPPORTED atom. At the
moment that doesn't sound like being needed as Plasma doesn't want to
provide an own implementation.

The implementation comes with a small test application showing how
the feature is intended to be used.

REVIEW: 115910
2014-02-26 12:54:00 +01:00
Martin Gräßlin 95ab9d05aa [kwin] Remove dependency on KF5Declarative
It's a runtime dependency as PlasmaCore pulls it in automatically,
so we don't it as all the QML we currently ship uses PlasmaCore.
2014-02-26 08:30:52 +01:00
Martin Gräßlin 4586767db8 [kwin] Use imported targets for all XCB libs
Requires 04f78489265b6e52cabd2980dfc417abeee3a695 from ECM
2014-02-25 15:48:39 +01:00
Martin Gräßlin b49b631851 Use new components based FindWayland from ECM
This allows us to better control which features are available.

Requires 6277f5d8acbca3704d3e9ebbdee908537cd7b6eb in ECM.
2014-02-25 14:46:24 +01:00
Martin Gräßlin 2c7d702b5a [kwin] Use FindEgl for finding egl instead of FindOpenGLES
Requires a2ada35b5c768e8efe9b51a41f84ec6e18ea805c from ECM!
2014-02-25 13:50:10 +01:00
Thomas Lübking 65f86baceb fix off-by-1 on multiscreen toppanel strutting 2014-02-24 20:12:24 +01:00
Thomas Lübking a0a976885c ensure to show clients that need sessionInteract
transients of minimized windows are not shown, thus missed
the sessionSavin branch
since window input is also largely blocked (eg. taskbar!)
they cannot easily be unshown (including their transients)
and thus block logout forever

REVIEW: 115955
2014-02-24 20:12:08 +01:00
Thomas Lübking 2501be4465 reset desktopChangedWhileRotating on activation
BUG: 331148
FIXED-IN: 4.11.7
REVIEW: 115942
2014-02-24 20:11:31 +01:00
Thomas Lübking aecd5af0b4 fix sendToScreen for QuickTiled windows
two-fold issue
a) setMaximize implicitly sets QuickTileMaximize; setting it again toggles it off
b) setting quicktile mode needs to happen in keyboard mode and thenn the target
   still depends on the current windo position, so the untiled window needs to
   be in a sane location (while geom_restore will typically be off-screen when
   quick tiling by mouse)

BUG: 330819
FIXED-IN:4.11.7
REVIEW: 115521
2014-02-24 20:11:31 +01:00
Thomas Lübking e9a8ea24a6 fix frontbuffer copying swap preference
REVIEW: 115523
CCBUG: 330794
CCBUG: 322060
2014-02-24 20:11:31 +01:00
Thomas Lübking bd87f1edc0 spatial present windows zoom calculation
instead 1/16 of the area, 1/4 of the bigger and 1/32
of the smaller screen/window ratio
(ie. a shaded window would typically zoom to 1/32 of the screen height)

BUG: 298402
FIXED-IN: 4.11.7
REVIEW: 115455
2014-02-24 20:11:31 +01:00
Thomas Lübking 68fc751916 be more aggressive about exiting zoom effect
CCBUG: 289336
REVIEW: 115453
2014-02-24 20:11:31 +01:00
Thomas Lübking acaf4807ab align zoomed cursor to hotspot
BUG: 330679
FIXED-IN: 4.11.7
REVIEW: 115453
2014-02-24 20:11:31 +01:00
Matteo De Carlo 8b5e4bfcfe Replace NULL with nullptr in clients folder
Replacing all NULL to nullptr in all the files in clients folder
(also substituting some "0" used as nullptr with nullptr)

REVIEW: 115921
2014-02-24 17:02:11 +01:00
Matteo De Carlo 4e4be83418 Replace NULL with nullptr in libkdecorations folder
Replacing all NULL to nullptr in all the files in libkdecorations folder
(also substituting some "0" used as nullptr with nullptr)

REVIEW: 115919
2014-02-24 16:47:48 +01:00