Commit graph

12296 commits

Author SHA1 Message Date
l10n daemon script
7553c411c2 SVN_SILENT made messages (.desktop file) 2014-05-03 08:32:58 +00:00
Burkhard Lück
82b7804b0a rename kcmshell4 to kcmshell5 2014-05-02 17:24:47 +02:00
l10n daemon script
2f28437e24 SVN_SILENT made messages (.desktop file) 2014-05-02 08:51:14 +00:00
l10n daemon script
2838a9b606 SVN_SILENT made messages (.desktop file) 2014-04-29 10:12:33 +00:00
Martin Gräßlin
b18c672e36 Fix compilation with gcc-4.9
Looks like one needs to include <functional> if one uses std::function.

Compilation verified with:
* gcc-4.8
* gcc-4.9
* clang-3.2
2014-04-29 07:49:54 +02:00
l10n daemon script
15aa971aab SVN_SILENT made messages (.desktop file) 2014-04-29 04:54:44 +00:00
Martin Gräßlin
5014e2874b Fix comparison between signed and unsigned integer expressions warning 2014-04-28 17:29:06 +02:00
Martin Gräßlin
ee20101142 Fix deprecated warnings for KAboutData
Ctor with catalog name got deprecated, use ctor without it.
2014-04-28 17:11:20 +02:00
Martin Gräßlin
7091452acd Fix unused variable warnings for compilation without xkbcommon
Sorry, my fault that this generated warnings in the first place.
2014-04-28 16:57:35 +02:00
Aleix Pol
36e93e9c5a Adapt to changes in KDEInstallDirs
Plugins of non kf5 frameworks are not in a kf5/ subdir anymore

REVIEW: 117838
2014-04-28 15:36:44 +02:00
Martin Gräßlin
21a0cda055 [desktopgrid] Use BuiltInEffects to specify the name of the effect proxy
DesktopGrid uses PresentWindows Effect as a proxy effect. Instead of
hard coding the name of the Effect let's use the name resolving provided
by BuiltInEffects.
2014-04-28 14:18:36 +02:00
Martin Gräßlin
c1b4167598 [effects] Allow Built-In Effects using xcbutils.h
xcbutils.h has quite a few inline only implementations such as Xcb::Atom,
the Wrappers, Xcb::Window and the convenient methods. Thus there is
nothing wrong with using it from the built-in Effects.

Xcb::Atom is used in Glide and Logout Effect to get the atom. To keep the
logic of the existing code it got extended by a bool isValid() which
gets the reply and returns true if the atom is set.

REVIEW: 117587
2014-04-28 14:14:20 +02:00
Martin Gräßlin
336a870f5e [kcmkwin] Fix locating the effect configurations
No longer in kf5/ prefix.
2014-04-28 14:06:18 +02:00
Martin Gräßlin
7fcecc616c Drop "kwin4_effect_" prefix for BuiltIn Effects
This removes all the hacks to add kwin4_effect_ to the name of the Effect
and adjusts the desktop files of the effect configuration's parent
component.

Note: the scripted effects still start with kwin4_effect_ prefix.

REVIEW: 117367
2014-04-28 13:52:50 +02:00
Martin Gräßlin
4a1bc2ec96 [effects] Drop the .desktop files for the BuiltIn Effects
All KCMs and KWin core use the BuiltInEffects namespace to find and
interact with the effects. There is no information left in the desktop
file which are of usage. Thus they can be removed.
2014-04-28 13:52:43 +02:00
Martin Gräßlin
4da220adef [kcmkwin/tabbox] Use BuiltInEffects to find CoverSwitch and FlipSwitch
Instead of using the KServiceTypeTrader we use the BuiltInEffects to get
the name of CoverSwitch and FlipSwitch.

Showing the configuration dialog is migrated to KPluginTrader which fixes
the showing of the dialog.
2014-04-28 13:51:30 +02:00
Martin Gräßlin
a20903986a [kcmkwin/screenedges] Use BuiltInEffects to find the Desktop Effects
Instead of using the KServiceTypeTrader we just ask the BuiltInEffects
for the name of our Effects.
2014-04-28 13:51:30 +02:00
Martin Gräßlin
98d813050e [kcmkwin/desktop] Use BuiltInEffects for integration with Effects
The desktops KCM allows selecting between the virtual desktop switching
effects. For those it offers configuring and showing the information.

The KServiceTypeTrader based search is adjusted to be only used for the
scripted effects. The built-in effects are queried through the
information available through the BuiltInEffects namespace.
2014-04-28 13:51:30 +02:00
Martin Gräßlin
a784c91844 [kcmkwin/compositing] Use BuiltinEffects to find all built-in effects
The EffectData in BuiltinEffects is extended by all the data needed for
the desktop effects KCM:
* display name
* comment
* category
* video-url
* exclusive group
* internal

This information is taken directly from the desktop files.

The Built-in effects are now also resolved through the BuiltInEffects
namespace and the KServiceTypeTrader query is adjusted to only find the
scripted effects.

Unfortunately this introduces another round of adding "kwin4_effect_" to
load and save the effects correctly. This will be removed once all KCMs
are adjusted to use the new BuiltInEffects.
2014-04-28 13:51:30 +02:00
Martin Gräßlin
3e32bf9f56 Improve specifying the data about the built-in effects
Instead of having several hashes with data about the built-in effect,
we use a struct EffectData which contains the name, the enabled by
default state and function pointers to create, supported and check
enabled by default. There is one static vector with all the data
specified which is ordered by the BuiltInEffect enum. Thus an enum value
can be used as an index to the data.

In addition it's no longer resolved around QByteArray, but uses QString.

REVIEW: 117354
2014-04-28 13:48:50 +02:00
Martin Gräßlin
e4be4082a0 Require xkbcommon 0.4.1
That's the version required in Qt 5.3 and causing issues if there's a
mismatch in versions.

CCBUG: 333459
2014-04-28 12:07:28 +02:00
l10n daemon script
e1f418f4d0 SVN_SILENT made messages (.desktop file) 2014-04-28 09:00:35 +00:00
Martin Gräßlin
7d302b9039 Keep timestamp of last syncRequest and update with xTime on each sync
The sync protocol with e.g. Qt 4 windows is broken if our app time is
older than the one of the last sync alarm event. Thus we keep a timestamp
in the syncRequest struct of the last sent sync request. If the timestamp
is newer than our xTime when sending the next request, we update the
xTime to ensure that we have a new timestamp again.

BUG: 333512
REVIEW: 117734
2014-04-28 07:45:53 +02:00
l10n daemon script
f44575ddbf SVN_SILENT made messages (.desktop file) 2014-04-28 05:16:52 +00:00
l10n daemon script
69c3289c18 SVN_SILENT made messages (.desktop file) 2014-04-27 21:02:43 +00:00
l10n daemon script
ac9c8f6852 SVN_SILENT made messages (.desktop file) 2014-04-27 05:24:22 +00:00
Alex Merry
4804964b3d Install kwin.notifyrc to the correct location 2014-04-26 22:27:35 +01:00
Aleix Pol
220da8a4e5 Adapt to changes in KDEInstallDirs
kde5/services is kservices5
kde5/servicetypes is kservicestypes5
2014-04-26 19:27:52 +02:00
Alex Merry
e5a1f9b309 Remove CONFIG argument from find_package(KF5)
This is no longer wanted, since ECM has a FindKF5 module.
2014-04-26 11:03:30 +01:00
Martin Gräßlin
b92f4a6991 [kwincompositing-kcm] Fix the reinit signal invocation
REVIEW: 117700
2014-04-25 10:04:04 +02:00
Michael Palimaka
801873b216 Fix configure failure when optional packages are missing.
When find_package(KF5 CONFIG REQUIRED) is called, any subsequent
find_package(KF5) calls will be marked as required too. So,
find optional frameworks separately to avoid configure failure
if they are missing.

Also add information about the status of the optional packages
to the feature summary.

REVIEW: 117728
2014-04-24 22:34:26 +10:00
Martin Gräßlin
8e63102855 Discard all deleted before constructing the Scene
The Scene connects to the deletedRemoved signal and tries to remove the
Deleted from it's list of Windows, which will fail because a SceneWindow
doesn't get created for an existing Deleted in the Scene setup.

It doesn't make sense to create a SceneWindow for a Deleted as there is
no pixmap around anyway. Thus the best approach is to ensure that there
are no Deleted by just discarding all prior to creating the Scene.

BUG: 333275
REVIEW: 117557
2014-04-23 15:05:27 +02:00
Marco Martin
ad7e1f6260 don't do fadeout on ksplashqml 2014-04-23 13:24:37 +02:00
Marco Martin
b42cbe66ba make ksplashqml work again 2014-04-23 13:21:22 +02:00
l10n daemon script
4242a0e009 SVN_SILENT made messages (.desktop file) 2014-04-23 04:57:49 +00:00
l10n daemon script
8d83f165d1 SVN_SILENT made messages (.desktop file) 2014-04-20 04:39:49 +00:00
Michael Palimaka
1bca6c3dfa Disable testing if QtTest is not found.
REVIEW: 117393
2014-04-18 16:43:24 +10:00
Martin Gräßlin
f247a41396 [glutils] Forward declare void KWin::cleanupGL() in kwinglplatform.h
Fixes build with clang.
2014-04-17 08:04:53 +02:00
Martin Gräßlin
b45eeae352 [Xcb::Wrapper] Introduce a Property and StringProperty Wrapper subclass
The Xcb::Property can wrap the xcb_get_property call and provides
convenient access methods to read the value of the reply with checks
applied. For this it provides a templated ::value method for reading a
single value or reading an array. There's also a ::toBool and
::toByteArray which performs the conversion directly with default values
for the type and format checks.

Xcb::TransientFor is changed to be derived from Property instead of
Wrapper directly, so that the reading of the property value can be
shared.

Xcb::StringProperty is a convenient wrapper derived from Property to
handle the reading of a string property providing a cast to QByteArray
operator. This replaces the ::getStringProperty from utils. Though the
separator functionality from ::getStringProperty is not provided as that
is only used in one function and handled there.

All the custom usages of xcb_get_property or getStringProperty are
replaced to use this new wrapper. That simplifies the code and ensures
that all properties are read in the same way.

REVIEW: 117574
2014-04-17 07:41:33 +02:00
Martin Gräßlin
8d3b12b928 [Xcb::Wrapper] Change the Wrapper to use variadic template arguments
So far the Wrapper class was not able to properly wrap all xcb calls and
there was the restriction that the request function needs to have an
xcb_window_t argument. The result was that wrapper functions were used
for calls with no arguments or for multiple arguments, but in a rather
limited way.

By using variadic template arguments this restriction is removed and the
Wrapper is able to wrap any xcb request/reply group. The main difference
is how the function pointers are defined. Those cannot be specified as
template arguments as the variadic arguments need to be the last in the
list.

The pointers are now defined by a WrapperData struct. For complete usage
please see the extensive documentation added to WrapperData on how it is
supposed to be used.

REVIEW: 117559
2014-04-17 07:41:11 +02:00
Martin Gräßlin
98f259d63e [Xcb::Wrapper] Add unit test for TransientFor 2014-04-17 07:41:11 +02:00
Martin Gräßlin
e25abdf3bb [Xcb::Wrapper] Add unit test for CurrentInput 2014-04-17 07:41:11 +02:00
Martin Gräßlin
9db9f172bc [Xcb::Wrapper] Add a unit test for Xcb::Tree
Based on the test Tree::children() is extended for a test case on no
children which used to return a garbage pointer.
2014-04-17 07:41:11 +02:00
Martin Gräßlin
4230a0d331 [effects] Get xcb_connection_t* and rootWindow through EffectsHandler API
So far the effects could just use the connection() and rootWindow()
provided by kwinglobals. Thus an internal detail from KWin core is
accessed directly.

To be more consistent with the rest of the API it's wrapped through the
EffectsHandler and with a convenient method in Effect.

The connection() is provided as xcbConnection() to free the very generic
name connection which could create confusion once we provide a wayland
connection to the Effects.

The rootWindow() is provided as x11RootWindow() to indicate that it is
for the X11 world.

REVIEW: 117597
2014-04-16 16:05:05 +02:00
Martin Gräßlin
93e5ebac63 Try to wait for DESTROY_NOTIFY before releasing an Unmanaged
So far the Unmanaged got released after an XCB_UNMAP_NOTIFY. This event
gets created after xcb_unmap_window or after xcb_destroy_window. In the
latter case the window is already distroyed and any of KWin's cleanup
calls will cause a BadWindow (or similar) error.

The idea to circumvent these errors is to try to wait for the
DESTROY_NOTIFY event. To do so the processing of the release is slightly
delayed. If KWin gets the destroy notify before the delay times out the
Unamanged gets released immediately but with a Destroy flag. For this a
new enum ReleaseToplevel is introduced and Unmanage::release takes this
as an argument instead of the bool which indicated OnShutdown. Also this
enum is added to Toplevel::finishCompositing so that it can ignore the
destroyed case and not generate an error.

REVIEW: 117422
2014-04-16 13:32:11 +02:00
Martin Gräßlin
d2d89653b2 Print better error messages for XCB errors from extensions
Qt doesn't print proper error messages for any errors caused by
extensions. As KWin is a heavy user of extensions not of interest to Qt
(e.g. damage or composite) we do our own error code mapping.

The Xcb::ExtensionData is extended by a vector of OpCodes and ErrorNames.
In ::workspaceEvent it's checked whether the event is an error and if
that is the case KWin tries to map the error to one of the extensions.

If that is successful it prints a warning looking like Qt's one:
XCB error: 151 (BadDamage), sequence: 12534, resource id: 127926362, \
    major code: 143 (DAMAGE), minor code: 2 (Destroy)

and the event gets filtered out, so that the Qt error messages is not
printed in addition.

If the error is not from one of the extensions the error is not filtered
out and so the default Qt behavior gets applied.

REVIEW: 117421
2014-04-16 13:30:31 +02:00
Martin Gräßlin
fd0fd82ad6 Use NETWM to get updates on blocking compositing
Adds NET::WM2BlockCompositing to the Client's properties which allows to
read the state from the NETWinInfo object and get updates without having
to resolve the atom ourselve.

REVIEW: 117561
2014-04-14 15:34:39 +02:00
Martin Gräßlin
c63e3533f4 Get Toplevel::resourceName() and ::resourceClass() from NETWinInfo
It's provided by the NETWinInfo, no need to keep an own implementation.
To keep compatibility with existing KWin code using the window class or
resource it's always converted to lower.

In addition a notify signal Toplevel::windowClassChanged is added and
emitted from the event handler whenever the WM2WindowClass property is
set.

REVIEW: 117496
2014-04-14 08:46:38 +02:00
Martin Gräßlin
b8cc10ffab [kwinglutils] Improve cleanup handling
* add static cleanup handlers to GLTexturePrivate and GLRenderTarget
* revert the runtime resolved features (e.g. RenderTargets are not
  supported once we run the cleanup code)
* clear the extension lists
* reset the version variables

REVIEW: 117484
2014-04-14 08:33:19 +02:00
Martin Gräßlin
c837ffddf4 Add a cleanup() method to GLPlatform
Adds a cleanup() method to GLPLatform which deletes the static instance.
It gets invoked from cleanupGL() in kwinglutils on tear-down of the
OpenGL backend. Thus the backend doesn't leave incorrect GL info around.

E.g. if KWin starts with llvmpipe the recommended compositor is XRender.
So the backend and the platform is created. Now KWin starts the XRender
Compositor and the GLPlatform is still valid and when trying to load the
Blur or Contrast effect this will succeed as the GLPlatform data would
allow it. But on first try to use the Effect it will fail due to no
valid OpenGL context and even crash.

REVIEW: 117480
2014-04-14 08:31:39 +02:00