Commit Graph

413 Commits (bc0a9cb53a98c181fe62e1f99cc6bba039b05605)

Author SHA1 Message Date
Martin Gräßlin 12a4923959 [kwin] Use std::find_if and lambda functions for Workspace::findUnmanaged
Instead of passing the macro based Predicate to findUnmanaged it now
expects a function which can be passed to std::find_if.

Existing code like:
xcb_window_t window; // our test window
Unmanaged *u = findUnmanaged(WindowMatchPredicated(window));

becomes:
Unmanaged *u = findUnmanaged([window](const Unmanaged *u) {
    return u->window() == window;
});

In addition an overload is added which takes the window id to cover
the common case to search for an Unmanaged by its ID. The above example
becomes:
Unmanaged *u = findUnmanaged(window);

The advantage is that it is way more flexible and has the logic what
to check for directly with the code and not hidden in the macro
definition.
2014-03-25 15:17:10 +01:00
l10n daemon script 10f89d6019 SVN_SILENT made messages (.desktop file) 2014-03-24 04:35:26 +00:00
Martin Gräßlin 38201a8295 Properly support key events in TabBox over InputRedirection
Forward all key press events to the TabBox if it is currently grabbed and
connect the TabBox to the modifiers changed signal for checking if TabBox
should be ended.
2014-03-19 14:14:56 +01:00
Martin Gräßlin d1d3401b9f Register KWin's global shortcuts with the new shortcut system
All the KWin core shortcuts get also registered inside the new global
shortcut system so that they are still triggered when running KWin on
Wayland.
2014-03-19 14:14:56 +01:00
Martin Gräßlin 46392a337d [kwin] Port autotests away from kde4_add_unit_test 2014-03-18 11:49:53 +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
l10n daemon script 2242efeb06 SVN_SILENT made messages (.desktop file) 2014-03-13 04:46:24 +00: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
l10n daemon script b7a029619b SVN_SILENT made messages (.desktop file) 2014-03-03 04:35:02 +00:00
Matteo De Carlo 8a9cdba6ae Replace NULL with nullptr in tabbox folder
Replacing all NULL to nullptr in all the files in tabbox folder
(also substituting some "0" used as nullptr with nullptr)

REVIEW: 115917
2014-02-24 16:42:43 +01:00
l10n daemon script 9c8800249a SVN_SILENT made messages (.desktop file) 2014-02-24 04:38:53 +00:00
l10n daemon script 31d0cc055b SVN_SILENT made messages (.desktop file) 2014-02-22 04:23:30 +00:00
l10n daemon script 6f8c3dd771 SVN_SILENT made messages (.desktop file) 2014-02-18 05:12:30 +00:00
l10n daemon script f67e67e5f0 SVN_SILENT made messages (.desktop file) 2014-02-09 05:45:40 +00:00
Martin Gräßlin 04716ae5e3 [kwin] Rename tests subdirectories to autotests
Follows the naming schemes in frameworks and opens up the possibility
to include test applications for KWin in the tests subdirectory.
2014-01-30 11:01:59 +01:00
l10n daemon script 2297dccdc6 SVN_SILENT made messages (.desktop file) 2014-01-21 04:13:28 +00:00
l10n daemon script 22a5e1109f SVN_SILENT made messages (.desktop file) 2014-01-19 04:06:03 +00:00
l10n daemon script eac8a41fed SVN_SILENT made messages (.desktop file) 2014-01-15 04:10:52 +00:00
l10n daemon script 4ed47fd70b SVN_SILENT made messages (.desktop file) 2014-01-12 04:10:53 +00:00
l10n daemon script ce8c99cbef SVN_SILENT made messages (.desktop file) 2014-01-06 04:01:54 +00:00
l10n daemon script 1fb1a178fd SVN_SILENT made messages (.desktop file) 2014-01-05 04:08:18 +00:00
Martin Gräßlin 8de72623c6 [kwin/tabbox] Use property binding for x and y properties
After changes in PlasmaCore.Dialog we can finally get rid of updating
the position on each visible change.

It's not 100 % perfect yet, seems the binding on screenGeometry is not
working properly. That needs investigation.
2014-01-03 12:59:14 +01:00
Martin Gräßlin 47f443479c [kwin] Port Plasma::Dialog from windowFlags to flags 2014-01-03 11:33:14 +01:00
l10n daemon script e05a97f216 SVN_SILENT made messages (.desktop file) 2014-01-03 04:48:00 +00:00
Mihail Ivchenko d7e2df674a [kwin] Add a method longestCaption() in TabBox::DesktopModel.
REVIEW: 114585
2013-12-22 10:40:28 +01:00
l10n daemon script 22640e26f3 SVN_SILENT made messages (.desktop file) 2013-12-22 04:09:59 +00:00
l10n daemon script da9baf3de6 SVN_SILENT made messages (.desktop file) 2013-12-20 04:27:47 +00:00
l10n daemon script d138d12261 SVN_SILENT made messages (.desktop file) 2013-12-17 04:08:15 +00:00
Martin Gräßlin 1d7ee61741 [kwin] Register QAbstractItemModel as a qml type in TabBox
It's needed if we don't import any Plasma components.
2013-12-16 11:48:41 +01:00
l10n daemon script fcd15efb31 SVN_SILENT made messages (.desktop file) 2013-12-16 04:03:25 +00:00
l10n daemon script 3e5ce246d8 SVN_SILENT made messages (.desktop file) 2013-12-15 04:06:27 +00:00
l10n daemon script a9d29b0d7c SVN_SILENT made messages (.desktop file) 2013-12-14 03:57:59 +00:00
l10n daemon script 4f1c1c2c83 SVN_SILENT made messages (.desktop file) 2013-12-13 04:38:28 +00:00
Martin Gräßlin d6e1920be3 [kwin/tabbox] Delete no longer needed declarative.(h|cpp)
Used to be the QQuickView implementation for the tabbox. As it's now
controlled through opening windows from QML directly it's no longer
needed or used anywhere.
2013-12-12 11:32:57 +01:00
Martin Gräßlin f5340a27c5 [kwin/tabbox] Drop define TABBOX_KCM
No longer needed as the preview does not include the tabboxhandler
any more.
2013-12-12 11:29:25 +01:00
Martin Gräßlin f07209d685 [kwin/tabbox] Remove no longer needed tabbox.qml and ShadowedSvgItem.qml 2013-12-12 09:39:56 +01:00
Martin Gräßlin af639d90e7 [kwin/tabbox] Adjust thumbnail desktop switcher to API changes 2013-12-12 09:37:30 +01:00
Martin Gräßlin 2f513476a6 [kwin/tabbox] Adjust informative desktop switcher to API change
Note: icon list seems broken
2013-12-12 09:37:30 +01:00
Martin Gräßlin a24218a9a1 [kwin/tabbox] Drop window strip switcher
No longer needed in a Plasma2 world as the components have a thumbnail
component, so the hack to go over KWin to render the thumbnails is no
longer needed.

Approved by Aaron on mailinglist:
https://mail.kde.org/pipermail/active/2013-December/007254.html
2013-12-12 09:37:30 +01:00
Martin Gräßlin 5e41e13a39 [kwin/tabbox] Adjust icon tabboxes to API changes 2013-12-12 09:37:30 +01:00
Martin Gräßlin a23b73cb02 [kwin/tabbox] Adjust sidebar to API changes 2013-12-12 09:37:30 +01:00
Martin Gräßlin 53e8aa1238 [kwin/tabbox] Adjust thumbnails to API change 2013-12-12 09:37:30 +01:00
Martin Gräßlin f6eb594c2d [kwin/tabbox] Adjust Grid to API change 2013-12-12 09:37:30 +01:00
Martin Gräßlin 1c953821c1 [kwin/tabbox] Adjust Compact to API change 2013-12-12 09:37:30 +01:00
Martin Gräßlin 1deb986870 [kwin/tabbox] Fix naming of Text only tabbox 2013-12-12 09:37:30 +01:00
Martin Gräßlin 2448b8d4b2 [kwin/tabbox] Adjust text tabbox to new API 2013-12-12 09:37:30 +01:00
Martin Gräßlin 4ff2a5ea3e [kwin/tabbox] Informative qml uses new Switcher item and PlasmaCore.Dialog
Reference implementation for the adjustments to use a PlasmaCore.Dialog
and the new required switcher item.
2013-12-12 09:37:29 +01:00
Martin Gräßlin d536532f66 [kwin/tabbox] Use a QmlComponent instead of a QQuickView for TabBox
By not using a QQuickView it becomes possible to just use a
PlasmaCore.Dialog or a Quick.Window in the TabBox qml and thus it's
possible to simplify the qml code.

To support this a new SwitcherItem is introduced and exported to QML.
It's a simple QObject providing all the properties which used to be
exported to the root context. A declarative TabBox is expected to
use one of these items. The C++ side finds the Switcher and for that
supports the case that the SwitcherItem is the rootItem or a child
item.

A declarative TabBox has also to create a QQuickWindow, e.g. a
PlasmaCore.Dialog. The visibility of that window should be controlled
through the visible property on the SwitcherItem. The underlying C++
implementation assumes that a TabBox only uses one window (it needs to
get destroyed once it's hidden and included in highlight windows).

Thanks to this change it's no longer needed to reload the TabBox
whenever it gets shown or the alternative TabBox gets shown. Instead
the same QML script can get reused. Other created switchers are ignored
as the visible property won't be changed to true.
2013-12-12 09:37:29 +01:00
Martin Gräßlin 3f7344501f [kwin/tabbox] Make ClientModel::longestClient() invokable
This allows to just invoke the method on the model instead of setting
it from the C++ side.
2013-12-12 09:37:29 +01:00