Commit Graph

11751 Commits (92761e9e30d8ad3431e2003425f8de9b38cc0053)

Author SHA1 Message Date
Martin Gräßlin 92761e9e30 [kwin] Fix ifdefs for Wayland
With the switch to FindWayland from ECM WAYLAND_FOUND was no longer set
thus the ifdef didn't work. Now we use HAVE_WAYLAND and HAVE_WAYLAND_EGL.
2014-03-18 09:00:49 +01:00
Martin Gräßlin 9f22a99887 Install cursor from Effects mouse interception to Wayland surface
Unfortunately this is extremely platform specific with code for X11 and
Wayland. But at the moment it doesn't make much sense to abstract as
Effects are the only case where a fullscreen low level input area is
used.

A small problem is also that the mouse cursor doesn't get restored and
is changed when the X11 cursor changes. This will be fixed once we start
to properly track the cursor of the individual X windows.
2014-03-18 09:00:49 +01:00
Martin Gräßlin f9704ff0df Add support for Wayland Cursor themes
WaylandSeat can install a cursor based on Qt::CursorShape using the
Wayland cursor theme library.
2014-03-18 09:00:49 +01:00
Martin Gräßlin e18bb1006a Make mapping between Qt::CursorShape and theme name public
It's of general interest as Wayland cursor uses the same theme name.
2014-03-18 09:00:49 +01:00
Martin Gräßlin d3c4a46c59 Track used cursor theme and size in Cursor
Reads the settings from kcminputrc. Unfortunately there is no update when
the settings change. This needs fixing in the cursors KCM first.
2014-03-18 09:00:49 +01:00
Martin Gräßlin 8b1040f78d Move installing cursor image form X11CursorTracker to WaylandSeat
This allows to install cursor images also from other parts.
2014-03-18 09:00:49 +01:00
Martin Gräßlin 7523c1e7d7 Integrate KWin::Cursor with InputRedirection
New inheriting class which uses the InputRedirection to track the cursor
position. It doesn't support warping of cursor.

This introduces a slight dependency loop in the startup. Cursor needs to
be created after the WaylandBackend to ensure that the operation mode is
set correctly. But the WaylandBackend itself is accessing Cursor. It
should be safe as inside the WaylandBackend it's only accessed after
callbacks.
2014-03-18 09:00:49 +01:00
Martin Gräßlin 6619faa6ac Pass pointer events through the effect system
InputRedirection forwards pointer events (currently motion, press and
release) through the EffectsHandlerImpl for the case that an effect has
intercepted pointer events.

If the KWin operation mode is not X11 only, the window for intercepting
the mouse events is no longer created.
2014-03-18 09:00:49 +01:00
Martin Gräßlin 940d9fb513 ScreenEdges which do not need X windows
A new AreaBasedEdge is introduced which supports the Edge functionality
by just connecting to the globalPointerChanged signal of
InputRedirection.

The AreaBasedEdges are used if KWin's operation mode is not X11 only.
This unfortunately required to change the datatype of the list of edges
in ScreenEdges. It used to be specific on the inheriting class.
2014-03-18 09:00:49 +01:00
Martin Gräßlin 1617deabb8 Introduce the beginning of an InputRedirection class
So far this new class is not yet doing much. The WaylandBackend forwards
the received pointer events to this InputRedirection class. From there
signals are emitted to inform internal areas about the changes first.

The events are currently forwarded to X through the xtest extension. This
will be removed in future. Input will be forwarded directly to the
surface which wants it (no matter whether X11 or Wayland).
2014-03-18 09:00:49 +01:00
Martin Gräßlin 7b14c84819 [kwin] Remove DragToClose from Present Windows Effect
It was a stupid idea, never made it into production, clutters the code,
makes EffectFrame more complex... -> drop.

REVIEW: 116861
2014-03-18 08:14:00 +01:00
Martin Gräßlin 8e4f8f0d9c [kwin/kcms] Only link KCMUtils where needed
In some KCMs we don't use anything from KCMUtils but just KCModule
which is in ConfigWidgets.
2014-03-18 07:41:30 +01:00
Martin Gräßlin 2fad6dbf46 [kwin/kcmkwinoption] Remove unused kdialog.h include
It's kde4support and we don't have that.
2014-03-18 07:34:33 +01:00
Martin Gräßlin 74a4a1cd42 [kwin/kcmkwinoption] Remove not needed config-workspace.h include
There are no ifdefs taken from that code.
2014-03-18 07:32:45 +01:00
l10n daemon script 07a5088f42 SVN_SILENT made messages (.desktop file) 2014-03-18 05:07:11 +00:00
Aleix Pol c72e519d9c Remove KDE/ prefix in include directories
It's unneeded and deprecated since KF5.
2014-03-17 16:24:10 +01:00
Martin Gräßlin 89c2688f74 [kwin] Drop direct rendering detection from GLPlatform
It's no longer needed as the OpenGLBackend has a direct rendering
detection and the remaining OpenGL2 backend aborts if the backend
uses indirect rendering. Thus the GLPlatform must always have a
direct rendering context.

REVIEW: 116829
2014-03-17 10:58:59 +01:00
Martin Gräßlin abecbf2369 [kwin] Port away from deprecated functionality in KWindowSystem
Less warnings and more type safety.
2014-03-17 10:22:20 +01:00
Martin Gräßlin 5f6fcbbc9e [kwin/aurorae] Removed unused KPluginInfo
Removes warning about deprecated functionality.
2014-03-17 09:34:45 +01:00
Martin Gräßlin 161d8a83ea [kwin] Remove unused variable in Cube Effect
Left over from OpenGL1 removal.
2014-03-17 09:14:19 +01:00
Martin Gräßlin b38722dc04 [kwin] Adjust to changes in NETRootInfo ctor
Takes flag types.
2014-03-17 08:30:58 +01:00
Martin Gräßlin b0c0e81661 Adjust kde-workspace to changes in NETWMClient
ctor changed to take NET::Properties and NET::Properties2.
2014-03-17 08:13:14 +01:00
Martin Gräßlin f74df28450 [kwin] Use KPluginTrader and json metadata to find KDecorations
* A KDecoration needs to include json metadata
* A KDecoration needs to be installed to kwin/kdecorations
* Aurorae and Oxygen adjusted
* kcmdeco locates all decorations through the KPluginTrader
* libkdecoration uses KPluginTrader to find the plugin
* config plugins also need to include json metadata with
  X-KDE-PluginInfo-Name being the same as the decoration
* config plugins need to get installed to kwin/kdecorations/config
* kcmdeco locates the config plugin for a deco through the name
  and KPluginTrader

REVIEW: 116765
2014-03-17 07:41:14 +01:00
l10n daemon script 5e5b1100b2 SVN_SILENT made messages (.desktop file) 2014-03-17 04:41:37 +00:00
l10n daemon script 4d9c6af719 SVN_SILENT made messages (.desktop file) 2014-03-14 07:37:21 +00:00
Martin Gräßlin aeb90a2411 [kwin] Introduce a X-KWin-Internal in kwineffect services
X-KWin-Internal should be used for effects which are either internal
to KWin and are configured at a different location in KWin. Examples
are:
 * CoverSwitch - configured in WindowSwitcher KCM, but not FlipSwitch
   as that one has a non WindowSwitcher mode
 * window geometry - configured in moving

And it should also be used for helper effects to the overall
kde-workspace module. Examples are:
 * Dashboard - required by Plasma
 * KScreen - required for KScreen
 * Screenshot - required by KSnapshot

Why a new category and not the already existing NoShow property?
The idea is to just filter on the effects in the list. Thus it should
be possible to show them. But NoShow is clearly intended to not be
shown at all.

REVIEW: 116754
2014-03-13 09:09:44 +01:00
l10n daemon script 2242efeb06 SVN_SILENT made messages (.desktop file) 2014-03-13 04:46:24 +00:00
Martin Gräßlin 03ae8af5ef [kwin/effects] Put all minimize effects into an exclusive category
Still under Appearance but mutual exclusive by category with name
"minimize".

REVIEW: 116750
2014-03-12 16:32:42 +01:00
Martin Gräßlin d4201d90a8 [kwin] Disconnect lambda connection on destroy of slide effect
Lambda connections are tricky: they do not get automatically
disconnected when the captured [this] gets destroyed, but they get
disconnected when the sender object gets destroyed.

Thus the slide effect was crashing if it got disabled and a window
got deleted, because the connection was still present and tried to
access the destroyed this pointer.

To circumvent we need to pass this as context object.

REVIEW: 116712
2014-03-12 16:31:52 +01:00
Martin Gräßlin 612e1b525e [kwin/effects] Put all magnifiers into an exclusive category
Still under Accessibility but mutual exclusive by category with
name "magnifiers".

REVIEW: 116749
2014-03-12 16:28:44 +01:00
Martin Gräßlin 4703339ef6 [kwin/aurorae] Remove behavior animations on anchors
Looks like this completely broke in Qt. The groups are all placed at
0/0 if there is an animation defined and the complete layout is broken.

The animation is not that useful in fact so no big loss.
2014-03-12 11:45:46 +01:00
Martin Gräßlin e3271ec2e1 [kwin] Add isEffectSupported method to Effects DBus interface
EffectsHandlerImpl::isEffectsSupported performs the check whether the
effect with the given name is supported by the current compositor.

The check is the following:
* if effect is already loaded, it is supported
* if the effect cannot be found, it is not supported
* if it's a scripted effect, it's always supported
* if it's a built-in effect, we ask BuiltInEffects::supported
* for all other effects we resolve the library and the supported
  method

The idea behind providing this functionality in the DBus interface is
to allow filtering in the effects KCM for the effects which are
supported by the current compositor.

In addition a areEffectsSupported method is added which takes a
list of names and returns a list of bools.

REVIEW: 116665
2014-03-12 08:39:40 +01:00
Martin Gräßlin 098620832a [kwin/oxygen] Add context object to lambda connections in Oxygen::Factory
The connect is from the KDecorationOptions which lives longer than the
factory, thus the lambda might be invoked after the Factory got
destroyed. Adding the context object protects against that.
2014-03-12 07:58:39 +01:00
Martin Gräßlin d85f9971e0 [kwin] Introduce a X-KWin-Exclusive-Category in kwineffects service
All effects with

X-KWin-Exclusive-Category=category

are considered as mutual exclusive for specified category. So far this is
just a hint for the GUI representation. Such effects should get a
radio button while effects in the same category without that property
or with it set to false should get a checkbox.

As a first step the desktop change animation effects use this property
and are put into a new category "Virtual Desktop Switching Animation".

REVIEW: 116710
2014-03-12 07:34:50 +01:00
Martin Gräßlin a51cbf7b9e [kwin/kcmdeco] Show an information if close window by dbl click gets activated
The option changes the behavior of the menu button, thus we should point
out to the user that the behavior changes.

This is only done for Auroae configurations as other decorations have to
take care about it themselves.

CCBUG: 331462
REVIEW: 116715
2014-03-12 07:33:47 +01:00
Martin Gräßlin 9fc3aabc66 [kwin/aurorae] Default to no close on double click menu button
To increase consistency with other decorations and because it changes
the behavior of the menu button in an unexpected way we default to
double click menu button doesn't close the window.

BUG: 331462
FIXED-IN: 5.0
REVIEW: 116716
2014-03-11 15:46:21 +01:00
Martin Gräßlin b5451a7183 [kwin] Re-add desktop cube animation effects to our built in effects
Got lost in the transition to built-in effects.
2014-03-11 09:53:19 +01:00
l10n daemon script 9b402662b5 SVN_SILENT made messages (.desktop file) 2014-03-11 05:14:45 +00:00
Martin Gräßlin 2675b5d4e7 Merge branch 'KDE/4.11'
Conflicts:
	CMakeLists.txt
	kcontrol/screensaver/screensaver.desktop
	kdm/kfrontend/themes/elarun/KdmGreeterTheme.desktop
	khotkeys/kcm_hotkeys/kcm_hotkeys.cpp
	kinfocenter/main.cpp
	kscreensaver/kblank_screensaver/blankscrn.cpp
	kscreensaver/krandom_screensaver/random.cpp
	kstyles/oxygen/config/main.cpp
	kstyles/oxygen/demo/main.cpp
	ksysguard/gui/ksysguard.cpp
	kwin/clients/oxygen/demo/main.cpp
	kwin/kcmkwin/kwincompositing/kwincompositing.desktop
	kwin/tabbox/qml/clients/text/metadata.desktop
	kwin/tabbox/qml/clients/window_strip/metadata.desktop
	libs/plasmagenericshell/widgetsexplorer/package/metadata.desktop
	plasma/desktop/applets/pager/package/metadata.desktop
	plasma/desktop/shell/activitymanager/package/metadata.desktop
	plasma/desktop/shell/data/layouts/org.kde.plasma-desktop.defaultPanel/contents/layout.js
	plasma/desktop/shell/desktopcorona.cpp
	plasma/desktop/shell/main.cpp
	plasma/desktop/toolboxes/plasma-toolbox-desktoptoolbox.desktop
	plasma/desktop/toolboxes/plasma-toolbox-paneltoolbox.desktop
	plasma/generic/applets/batterymonitor/contents/ui/batterymonitor.qml
	plasma/generic/applets/systemtray/protocols/fdo/fdographicswidget.cpp
	plasma/generic/applets/systemtray/protocols/fdo/fdographicswidget.h
	plasma/generic/applets/systemtray/protocols/fdo/x11embeddelegate.cpp
	plasma/generic/runners/nepomuksearch/plasma-runner-nepomuksearch.desktop
	plasma/generic/wallpapers/color/plasma-wallpaper-color.desktop
	plasma/generic/wallpapers/image/plasma-wallpaper-image.desktop
	plasma/netbook/shell/nettoolbox/plasma-toolbox-nettoolbox.desktop
	statusnotifierwatcher/statusnotifierwatcher.cpp
	systemsettings/app/main.cpp
2014-03-10 21:21:16 +01:00
Kai Uwe Broulik bf72d31c5c Make scalein effect (feel) quicker
Inspired by the recent slidingpopups patch this aims to make the scalein effect feel a lot quicker.
It only scales the window from 0.75 to 1. Animation duraton is shortened to match the separate "fade" effect.

REVIEW: 115763
2014-03-10 20:46:41 +01:00
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