Wrapped in xcbutils.
In addition the check whether another WM is running in main.cpp is
improved by doing a checked request and directly checking for the
error. If there is an error, KWin puts out an error message and
quits.
* KApplication -> QApplication
* Qt::escape -> QString::toHtmlEscaped
* KDebug -> QDebug
In addition it uses KMessageBox::warningContinueCancelWId from
KInterProcessWindowing as we have the window id.
KCmdLineArgs is still used as the replacement is still in
kdeqt5staging.
Requires 9c45260942c0ee32267e651d981bfa33a6acb64d from qtx11extras.
Note: this does not fully replace the functionality which we used to
have. The event queue is not yet searched for the first even with a
timestamp.
The DBusCall is exported as a QObject to the QML environment. It is
intended as a declarative replacement for the callDBus method which used
to be exported on global scope in the QtQuick 1 world.
Example usage:
DBusCall {
id: dbus
service: "org.kde.KWin"
path: "/KWin"
method: "setCurrentDesktop"
arguments: [1]
Component.onCompleted: dbus.call()
}
Getting all functionality from old solution into new one is not really
possible. Main problems are that QtScript provided more functionality
than the QJSEngine. For example it's no longer possible to just export
functions to the engine. We need to have a Qt wrapper object. At the
moment this wrapper object doesn't export all functions as the callbacks
are tricky. A solution might be to create specific QML types
encapsulating functionality which used to be exported on the functions.
Nevertheless a basic QML script loads and works and the ported readConfig
function works, too.
Straight forward port. Note: this is currently crashing deep down in
QtQuick. To circumvent the crashes it helps to disable the property
highlightFollowsCurrentItem in the listviews. This solves the problem
that QtQuick crashes on first loading. Unfortunately it still crashes
if one tries to invoke TabBox for the second time.
AbstractThumbnailItem inherits from QQuickPaintedItem using QPainter to
do the fallback painting of icons.
The scene is adjusted to get the information from QQuickItem instead of
QDeclarativeItem. Clipping got a little bit more complex as the clip
path does not exist any more. To get it right the ThumbnailItem needs to
specify the parent it wants to be clipped to with the clipTo property.
E.g.:
clipTo: listView
The scene uses this clipTo parent item to correctly calculate the clip
region. Also the ThumbnailItem needs to have clipping enabled.
Note: this commit currently breaks TabBox as the qml and view are not
yet adjusted. In scripting the export of the item is disabled, but any
qml script using a ThumbnailItem would obviously also fail.
required until there's a dynamic poll rate, because 10Hz is too
low for magnifiers (lag), mousemark (paints too edgy), mouseclick
(often fails because it's easy to cycle the button state within 100ms)
- and the bouncing icon lags behind the mouse as well ;-)
REVIEW: 111909
required until there's a dynamic poll rate, because 10Hz is too
low for magnifiers (lag), mousemark (paints too edgy), mouseclick
(often fails because it's easy to cycle the button state within 100ms)
- and the bouncing icon lags behind the mouse as well ;-)
REVIEW: 111909