By default, hyper keys are interpreted as meta keys. However, due to
a Qt bug, it had been incorrectly mapped.
Commit b45b9090c3b66d541f57f8d049c22247f8c115ca in qtbase repo fixed it,
so the test needs adjustments.
The .clang-format file is based on the one in ECM except the following
style options:
- AlwaysBreakBeforeMultilineStrings
- BinPackArguments
- BinPackParameters
- ColumnLimit
- BreakBeforeBraces
- KeepEmptyLinesAtTheStartOfBlocks
Re-use Qt's implementation of handling non-Latin layouts here
For full ASCII range support (Alt+`, etc.) Qt needs to be patched still,
see QTBUG-90611
BUG: 375518
Occasionally, I see complaints about the file organization of kwin,
which is fair enough.
This change makes the source code more relocatable by removing relative
paths from includes.
CMAKE_CURRENT_SOURCE_DIR was added to the interface include directories
of kwin library. This means that as long as you link against kwin target,
the real location of the source code of the library doesn't matter.
With autotests, things are not as convenient as with kwin target. Some
tests use cpp files from kwin core. If we move all source code in a src/
directory, they will need to be adjusted, but mostly only in build
scripts.
The main advantage of SPDX license identifiers over the traditional
license headers is that it's more difficult to overlook inappropriate
licenses for kwin, for example GPL 3. We also don't have to copy a
lot of boilerplate text.
In order to create this change, I ran licensedigger -r -c from the
toplevel source directory.
Summary:
So far we were following a bit unique and rare doxygen comment style:
/**
* Contents of the comment.
**/
Doxygen comments with this style look balanced and neat, but many people
that contribute to KWin don't follow this style. Instead, they prefer
more traditional doxygen comment style, i.e.
/**
* Contents of the comment.
*/
Reviewing such changes has been a bit frustrating for me (so selfish!)
and for other contributors.
This change switches doxygen comment style in KWin to a more traditional
style. The main reason for doing this is to make code review process easier
for new contributors as well us.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D22812
Summary:
This is needed in virtual keyboard and also used KKeyServer so far. With
this change it is moved to new API provided in Xkb. The new translation
map is now also used for the direction from Qt::Key +
Qt::KeyboardModifier to xkb_keysym_t.
New implementation is supported by a new test case covering the same
combinations as in the existing direction.
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D7356
Summary:
Turn Xkb into a QObject
Reduced dependencies on other classes and allows to emit signal directly
instead of emitting a signal on another class.
Dependency inject KWayland::Server::SeatInterface into Xkb
No need to depend on WaylandServer from within Xkb.
[autotests] Add test case for Xkb::toQtKey
Tests all key codes KKeyServer is able to map to Qt.
Migrate Xkb::toQtKey away from KKeyServer
The regression in kwindowsystem in
32526718eae99ccb594360627586eebdf793372b showed once more that it's time
to migrate the xkb keysym to Qt::Key mapping away from KKeyServer. The
main problem with KKeyServer is that it's made for X11 and we don't have
X11 here. This causes warnings printed at runtime and the code only
works by accident at all because KKeyServer fails to initialise
modifiers. That is normally KKeyServer would include the modifiers, but
that is nothing we are interested in for mapping xkb keysyms to Qt::Key.
So to address this, KWin now implements the mapping itself. It's based
on the implementation in KKeyServer, but also improved by providing
faster xkb to Qt conversion (which matters for KWin more than the other
direction).
Long term plan is to extend this so that also on X11 it can be used.
Then it should be split out and be used in KKeyServer as a replacement
for the current implementation which could support both X11 and Wayland.
Test Plan:
New test case added which covers all keysyms supported by
existing KKeyserver mapping
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D7336