Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
c77a732
style: add missing whitespace in magiclamp config
Dec 2, 2023
b137498
fix(plugin): use floating point offscreen texture
Zamundaaa Dec 5, 2023
af2648c
fix(x11): fix MouseButtonPress events sent to decoration
zzag Dec 4, 2023
65c4dc1
fix(plugin): avoid relaying text during overview animation
davidedmundson Dec 6, 2023
e9fe6d5
fix: fix "Drag down to close" label visibility
zzag Dec 6, 2023
982fcf8
fix: have less concurrent animations
notmart Dec 6, 2023
dbd4674
fix(plugin): make transition between overview-grid modes longer
zzag Dec 6, 2023
a7257ee
feat: assign top-left screen corner to overview by default
zzag Dec 6, 2023
74d235e
perf: don't block client until acquire fence is signaled in WindowThu…
zzag Dec 7, 2023
9eca633
feat: change window highlight style in WindowHeapDelegate
zzag Dec 6, 2023
c325c12
perf: load thumbnail grid Plasma.Dialog on demand
zzag Dec 7, 2023
4fa019c
fix: fix sync'ing currentIndex
zzag Dec 7, 2023
3298177
perf: load close button in WindowHeapDelegate on demand
zzag Dec 7, 2023
24cee4f
perf: cache WindowThumbnail textures
zzag Dec 5, 2023
90e2023
build: bump Qt version requirement to 6.6.0
romangg Feb 22, 2024
49606e1
perf: load screen delegate asynchronously
zzag Dec 7, 2023
eead865
fix(plugin): disable acessibility integration on Wayland
Zamundaaa Dec 8, 2023
4a7aabd
perf: avoid additional FBO rendering the blurred background
davidedmundson Dec 8, 2023
c574105
fix(plugin): make window captions in Overview 2 lines at most
veggero Dec 12, 2023
0b71abc
fix(plugin): load milou on demand
zzag Dec 11, 2023
913ecb2
fix(plugin): cancel animations when screen is locked/unlocked
zzag Dec 12, 2023
ee3dc8f
refactor(plugin): replace OpacityMask with ShadowedTexture
awhiemstra Dec 14, 2023
06b0b41
fix: match Shift+Backtab against Shift+Tab
fanzhuyifan Dec 16, 2023
2d932d7
refactor: avoid QtDBus module include
romangg Feb 23, 2024
647a1d5
feat: change Shift+Backtab to Shift+Tab for tabbox
fanzhuyifan Dec 18, 2023
ae22126
fix(plugin): use correct type to match
fanzhuyifan Dec 20, 2023
8c1fc5a
refactor(plugin): don't rely on item type to determine drop behavior
awhiemstra Dec 20, 2023
2b35fb6
docs(plugin): remove obsolete comment
fanzhuyifan Dec 20, 2023
82bf6fa
fix(plugin): if window is set to "skip switcher", skip it from window…
Akselmo Dec 21, 2023
e491654
fix: always use GL_RGBA8 in offscreen quick view
Zamundaaa Jan 10, 2024
eac99e4
fix(plugin): hide "Drag Down to Close" when using a pointing device
zzag Jan 15, 2024
52474a5
fix: fix glitches in mouseclick
zzag Jan 15, 2024
445a910
perf: remove const refs in EffectFrame
zzag Jan 15, 2024
3811dd3
build: find epoxy dependency
romangg Feb 23, 2024
8675aa4
refactor: use STL pointers
romangg Feb 23, 2024
342580a
fix: make sure window thumbnails and Qt Quick resources are destroye…
Sodivad Jan 16, 2024
12f3e4c
fix(plugin): retarget fullscreen animation instead of restarting it
Zamundaaa Dec 15, 2023
a8bb62f
fix(plugin): sse SmoothPixmapTransform when stitching area screenshots
zzag Jan 18, 2024
a9fd142
fix(plugin): use InOutCubic easing
fanzhuyifan Jan 19, 2024
0c31875
fix(plugin): use InCubic easing
fanzhuyifan Jan 19, 2024
219c16a
fix: update kconf_update version
zzag Jan 23, 2024
fd5d8bb
fix: consider Qt::KeypadModifier relevant for global shortcuts
nicolasfella Jan 24, 2024
c320e86
test: add keypad global shortcuts section
romangg Feb 23, 2024
5b32495
feat: add script to drop old desktop switching shortcuts
zzag Jan 24, 2024
4e71b93
perf(plugin): unset PAINT_SCREEN_TRANSFORMED in zoom
zzag Jan 25, 2024
da475c5
fix: use FocusScope as main item of tabbox switcher
easyteacher Jan 25, 2024
0239a9b
fix: allocate an offscreen fbo with correct scale in OffscreenQuickView
zzag Jan 25, 2024
f79ebcc
fix: overwrite the output in OffscreenQuickView::setGeometry()
zzag Jan 25, 2024
450d3ad
feat(wl): implement closeable window rule
romangg Feb 23, 2024
97178c3
test: disable outline in breeze
zzag Jan 26, 2024
ca7d6df
fix: fix initialization of QEvent::isAccepted() in cloned events in O…
zzag Feb 1, 2024
600f173
fix: register touch action to activate Overview instead of toggling it
veggero Feb 1, 2024
550478f
fix: add cursor default shape fallback
romangg Feb 23, 2024
2491513
fix(plugin): cache screenshot attributes
zzag Feb 5, 2024
5b952fb
fix(plugin): always ref window when sliding it offscreen
zzag Feb 5, 2024
1b8afb4
fix(plugin): fix previous desktop indicator in desktopchangeosd
zzag Feb 2, 2024
08384ad
feat: hide "active mouse screen" option
zzag Feb 5, 2024
c944584
fix: don't scale WindowHeap in overview mode
notmart Feb 8, 2024
f5fdb10
fix: drop kwin-6.0-overview-activities-shortcuts script
zzag Feb 6, 2024
611b46a
feat(plugin): revoke Meta+Tab and Meta+Shift+Tab shortcuts for overview
zzag Feb 6, 2024
8a5ed74
refactor: adapt color correct d-bus interface to Plasma
romangg Feb 7, 2024
561238c
fix: avoid double delete of QQuickViews
davidedmundson Feb 9, 2024
b4c38ef
fix: fix a warning about incorrect anchor in overview
zzag Feb 12, 2024
5f93362
fix: activate on thumbnail click when selected
ismailof Feb 12, 2024
80f4fc0
fix(plugin): explicitly reset parent on teradown
davidedmundson Feb 13, 2024
eab1716
feat: implement additional _NET_WM_MOVERESIZE arguments
romangg Feb 23, 2024
d10bd08
fix: do caps lock is not shift lock
Zamundaaa Feb 13, 2024
1507af7
fix: only show otherScreenThumbnail if we are actually dragging
notmart Feb 15, 2024
3b61f1f
fix(wl): dispatch mouse events to internal windows via QWindowSystemI…
davidedmundson Feb 14, 2024
f2672fe
fix: allow switching between modes using shortcuts while already active
zzag Feb 15, 2024
111b2ee
fix: only handled input events in on-screen desktops
davidedmundson Feb 19, 2024
a7eb379
fix: set componentDisplayName for shortcut migration
nicolasfella Feb 19, 2024
37bc202
fix: fix zoom push mouse tracking on multi-monitor workspaces
Feb 20, 2024
740042a
feat: remove legacy virtual desktop number from the menu
Zamundaaa Feb 20, 2024
be218a9
feat: make screen edge toggle overview rather than cycle between modes
zzag Feb 16, 2024
572fb77
build: bump KDE dependencies version requirements
romangg Feb 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ cmake_minimum_required(VERSION 3.23 FATAL_ERROR)

project("The Compositor Modules" VERSION 0.1.0)

set(QT_MIN_VERSION "6.4.0")
set(KF6_MIN_VERSION "5.240.0")
set(KDE_PLASMA_VERSION "5.27")
set(QT_MIN_VERSION "6.6.0")
set(KF6_MIN_VERSION "6.0.0")
set(KDE_PLASMA_VERSION "6.0.0")

set(CMAKE_C_STANDARD 99)
set(CMAKE_CXX_STANDARD 20)
Expand Down Expand Up @@ -138,7 +138,7 @@ set_package_properties(KScreenLocker PROPERTIES
PURPOSE "For screenlocker integration in the Wayland session"
)

find_package(Breeze 5.9.0 CONFIG)
find_package(Breeze 6.0.0 CONFIG)
set_package_properties(Breeze PROPERTIES
TYPE OPTIONAL
PURPOSE "For setting the default window decoration plugin"
Expand Down
46 changes: 46 additions & 0 deletions autotests/integration/global_shortcuts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,52 @@ TEST_CASE("global shortcuts", "[input]")
QTRY_COMPARE(triggeredSpy.count(), 0);
}

SECTION("keypad")
{
auto zero_action = std::make_unique<QAction>();
zero_action->setProperty("componentName", QStringLiteral("kwin"));
zero_action->setObjectName(QStringLiteral("globalshortcuts-test-keypad-0"));

QSignalSpy zero_action_spy(zero_action.get(), &QAction::triggered);
KGlobalAccel::self()->setShortcut(
zero_action.get(),
QList<QKeySequence>{Qt::MetaModifier | Qt::KeypadModifier | Qt::Key_0},
KGlobalAccel::NoAutoloading);

auto insert_action = std::make_unique<QAction>();
insert_action->setProperty("componentName", QStringLiteral("kwin"));
insert_action->setObjectName(QStringLiteral("globalshortcuts-test-keypad-ins"));

QSignalSpy insert_action_spy(insert_action.get(), &QAction::triggered);
KGlobalAccel::self()->setShortcut(
insert_action.get(),
QList<QKeySequence>{Qt::MetaModifier | Qt::KeypadModifier | Qt::Key_Insert},
KGlobalAccel::NoAutoloading);

// Turn on numlock
quint32 timestamp = 0;
keyboard_key_pressed(KEY_NUMLOCK, timestamp++);
keyboard_key_released(KEY_NUMLOCK, timestamp++);

keyboard_key_pressed(KEY_LEFTMETA, timestamp++);
keyboard_key_pressed(KEY_KP0, timestamp++);
keyboard_key_released(KEY_KP0, timestamp++);
keyboard_key_released(KEY_LEFTMETA, timestamp++);
TRY_REQUIRE(zero_action_spy.size() == 1);
REQUIRE(insert_action_spy.empty());

// Turn off numlock
keyboard_key_pressed(KEY_NUMLOCK, timestamp++);
keyboard_key_released(KEY_NUMLOCK, timestamp++);

keyboard_key_pressed(KEY_LEFTMETA, timestamp++);
keyboard_key_pressed(KEY_KP0, timestamp++);
keyboard_key_released(KEY_KP0, timestamp++);
keyboard_key_released(KEY_LEFTMETA, timestamp++);
TRY_REQUIRE(insert_action_spy.size() == 1);
REQUIRE(zero_action_spy.size() == 1);
}

SECTION("x11 window shortcut")
{
auto c = xcb_connection_create();
Expand Down
5 changes: 5 additions & 0 deletions autotests/integration/lib/setup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ setup::setup(std::string const& test_name,
qunsetenv("XKB_DEFAULT_VARIANT");
qunsetenv("XKB_DEFAULT_OPTIONS");

auto breezerc = KSharedConfig::openConfig(QStringLiteral("breezerc"));
breezerc->group(QStringLiteral("Common"))
.writeEntry(QStringLiteral("OutlineIntensity"), QStringLiteral("OutlineOff"));
breezerc->sync();

base = std::make_unique<base_t>(base::wayland::platform_arguments{
.config = base::config(KConfig::OpenFlag::SimpleConfig, ""),
.socket_name = socket_name,
Expand Down
5 changes: 2 additions & 3 deletions autotests/integration/modifier_only_shortcut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,15 +270,14 @@ TEST_CASE("modifier only shortcut", "[input]")
keyboard_key_pressed(KEY_CAPSLOCK, timestamp++);
keyboard_key_released(KEY_CAPSLOCK, timestamp++);
QTRY_COMPARE(input::xkb::get_active_keyboard_modifiers(*setup.base->mod.input),
Qt::ShiftModifier);
Qt::NoModifier);
QTRY_COMPARE(triggeredSpy.count(), 1);

// currently caps lock is on
// shift still triggers
keyboard_key_pressed(modifier, timestamp++);
keyboard_key_released(modifier, timestamp++);
QTRY_COMPARE(input::xkb::get_active_keyboard_modifiers(*setup.base->mod.input),
Qt::ShiftModifier);
Qt::NoModifier);
QTRY_COMPARE(triggeredSpy.count(), 2);

// meta should also trigger
Expand Down
6 changes: 4 additions & 2 deletions autotests/integration/move_resize_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,8 @@ TEST_CASE("move resize window", "[win]")

// use NETRootInfo to trigger a move request
win::x11::net::root_info root(c.get(), win::x11::net::Properties());
root.moveResizeRequest(w, origGeo.center().x(), origGeo.center().y(), win::x11::net::Move);
root.moveResizeRequest(
w, origGeo.center().x(), origGeo.center().y(), win::x11::net::Move, XCB_BUTTON_INDEX_1);
xcb_flush(c.get());

QVERIFY(moveStartSpy.wait());
Expand All @@ -697,7 +698,8 @@ TEST_CASE("move resize window", "[win]")
root.moveResizeRequest(w,
client->geo.frame.center().x(),
client->geo.frame.center().y(),
win::x11::net::MoveResizeCancel);
win::x11::net::MoveResizeCancel,
XCB_BUTTON_INDEX_1);
xcb_flush(c.get());
QVERIFY(moveEndSpy.wait());

Expand Down
9 changes: 4 additions & 5 deletions autotests/integration/tabbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,12 @@ TEST_CASE("tabbox", "[win]")
quint32 timestamp = 0;
keyboard_key_pressed(KEY_CAPSLOCK, timestamp++);
keyboard_key_released(KEY_CAPSLOCK, timestamp++);
QCOMPARE(input::xkb::get_active_keyboard_modifiers(*setup.base->mod.input),
Qt::ShiftModifier);
QCOMPARE(input::xkb::get_active_keyboard_modifiers(*setup.base->mod.input), Qt::NoModifier);

// press alt+tab
keyboard_key_pressed(KEY_LEFTALT, timestamp++);
REQUIRE(input::xkb::get_active_keyboard_modifiers(*setup.base->mod.input)
== (Qt::ShiftModifier | Qt::AltModifier));
== Qt::AltModifier);
keyboard_key_pressed(KEY_TAB, timestamp++);
keyboard_key_released(KEY_TAB, timestamp++);

Expand All @@ -239,9 +238,9 @@ TEST_CASE("tabbox", "[win]")
QCOMPARE(setup.base->mod.space->tabbox->is_grabbed(), false);

// Has walked backwards to the previously lowest client in the stacking order.
QCOMPARE(get_wayland_window(setup.base->mod.space->stacking.active), c1);
QCOMPARE(get_wayland_window(setup.base->mod.space->stacking.active), c2);
QCOMPARE(setup.base->mod.space->stacking.order.stack,
(std::deque<space::window_t>{c2, c3, c1}));
(std::deque<space::window_t>{c1, c3, c2}));

surface3.reset();
QVERIFY(wait_for_destroyed(c3));
Expand Down
92 changes: 92 additions & 0 deletions autotests/integration/xdg-shell_rules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4025,6 +4025,98 @@ TEST_CASE("xdg-shell rules", "[win]")
QVERIFY(wait_for_destroyed(client));
}

SECTION("closeable dont affect")
{
// Initialize RuleBook with the test rule.
auto [config, group] = get_config();
group.writeEntry("closeable", false);
group.writeEntry("closeablerule", enum_index(win::rules::action::dont_affect));
group.writeEntry("wmclass", "org.kde.foo");
group.writeEntry("wmclasscomplete", false);
group.writeEntry("wmclassmatch", enum_index(win::rules::name_match::exact));
group.sync();
setup.base->mod.space->rule_book->config = config;
win::space_reconfigure(*setup.base->mod.space);

// Create the test client.
wayland_window* client;
std::unique_ptr<Surface> surface;
std::unique_ptr<XdgShellToplevel> shellSurface;
std::tie(client, surface, shellSurface) = createWindow("org.kde.foo");
QVERIFY(client);
QVERIFY(client->control->active);
REQUIRE(client->isCloseable());

// Destroy the client.
shellSurface.reset();
surface.reset();
QVERIFY(wait_for_destroyed(client));
}

SECTION("closeable force")
{
// Initialize RuleBook with the test rule.
auto [config, group] = get_config();
group.writeEntry("closeable", false);
group.writeEntry("closeablerule", enum_index(win::rules::action::force));
group.writeEntry("wmclass", "org.kde.foo");
group.writeEntry("wmclasscomplete", false);
group.writeEntry("wmclassmatch", enum_index(win::rules::name_match::exact));
group.sync();
setup.base->mod.space->rule_book->config = config;
win::space_reconfigure(*setup.base->mod.space);

// Create the test client.
wayland_window* client;
std::unique_ptr<Surface> surface;
std::unique_ptr<XdgShellToplevel> shellSurface;
std::tie(client, surface, shellSurface) = createWindow("org.kde.foo");
QVERIFY(client);
QVERIFY(client->control->active);
REQUIRE(!client->isCloseable());

// Destroy the client.
shellSurface.reset();
surface.reset();
QVERIFY(wait_for_destroyed(client));
}

SECTION("closeable force temporarily")
{
// Initialize RuleBook with the test rule.
auto [config, group] = get_config();
group.writeEntry("closeable", false);
group.writeEntry("closeablerule", enum_index(win::rules::action::force_temporarily));
group.writeEntry("wmclass", "org.kde.foo");
group.writeEntry("wmclasscomplete", false);
group.writeEntry("wmclassmatch", enum_index(win::rules::name_match::exact));
group.sync();
setup.base->mod.space->rule_book->config = config;
win::space_reconfigure(*setup.base->mod.space);

// Create the test client.
wayland_window* client;
std::unique_ptr<Surface> surface;
std::unique_ptr<XdgShellToplevel> shellSurface;
std::tie(client, surface, shellSurface) = createWindow("org.kde.foo");
QVERIFY(client);
QVERIFY(client->control->active);
REQUIRE(!client->isCloseable());

// The rule should be discarded when the client is closed.
shellSurface.reset();
surface.reset();
QVERIFY(wait_for_destroyed(client));
std::tie(client, surface, shellSurface) = createWindow("org.kde.foo");
QVERIFY(client);
REQUIRE(client->isCloseable());

// Destroy the client.
shellSurface.reset();
surface.reset();
QVERIFY(wait_for_destroyed(client));
}

SECTION("match after name change")
{
auto [config, group] = get_config();
Expand Down
1 change: 1 addition & 0 deletions como-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ include(CMakeFindDependencyMacro)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_LIST_DIR}/modules/")

find_dependency(Wrapland)
find_dependency(epoxy)
find_dependency(Pixman)
find_dependency(wlroots @WLROOTS_MIN_VERSION@)
find_dependency(Qt6Gui @QT_MIN_VERSION@)
Expand Down
4 changes: 3 additions & 1 deletion como/data/update_default_rules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ SPDX-License-Identifier: GPL-2.0-or-later

// read additional window rules and add them to kwinrulesrc

#include <QCoreApplication>
#include <QDBusConnection>
#include <QDBusMessage>
#include <QDebug>
#include <QStandardPaths>
#include <QtDBus>
#include <kconfig.h>
#include <kconfiggroup.h>

Expand Down
2 changes: 1 addition & 1 deletion como/desktop/kde/dbus/KWinDBusInterfaceConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set(KWIN_INTERFACE "@PACKAGE_KDE_INSTALL_DBUSINTERFACEDIR@/org.kde.KWin.xml")
set(KWIN_COMPOSITING_INTERFACE "@PACKAGE_KDE_INSTALL_DBUSINTERFACEDIR@/org.kde.kwin.Compositing.xml")
set(KWIN_EFFECTS_INTERFACE "@PACKAGE_KDE_INSTALL_DBUSINTERFACEDIR@/org.kde.kwin.Effects.xml")
set(KWIN_INPUTDEVICE_INTERFACE "@PACKAGE_KDE_INSTALL_DBUSINTERFACEDIR@/org.kde.kwin.InputDevice.xml")
set(KWIN_COLORCORRECT_INTERFACE "@PACKAGE_KDE_INSTALL_DBUSINTERFACEDIR@/org.kde.kwin.ColorCorrect.xml")
set(KWIN_NIGHTLIGHT_INTERFACE "@PACKAGE_KDE_INSTALL_DBUSINTERFACEDIR@/org.kde.KWin.NightLight.xml")
set(KWIN_WAYLAND_BIN_PATH "@CMAKE_INSTALL_FULL_BINDIR@/kwin_wayland")

# Still needs to be set as plasma-workspace expects it at compile time.
Expand Down
4 changes: 3 additions & 1 deletion como/desktop/kde/dbus/kwin.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
#include <como/win/space_qobject.h>
#include <como/win/subspaces_set.h>

#include <QDBusConnection>
#include <QDBusContext>
#include <QDBusMessage>
#include <QObject>
#include <QtDBus>

namespace como
{
Expand Down
18 changes: 9 additions & 9 deletions como/input/filters/internal_window.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <QWindow>
#include <Wrapland/Server/seat.h>
#include <Wrapland/Server/touch_pool.h>
#include <qpa/qwindowsysteminterface.h>

namespace como::input
{
Expand Down Expand Up @@ -51,15 +52,14 @@ class internal_window_filter : public event_filter<Redirect>
}

auto qt_event = button_to_qt_event(*this->redirect.pointer, event);
auto adapted_qt_event = QMouseEvent(qt_event.type(),
qt_event.pos() - internal->position(),
qt_event.pos(),
qt_event.button(),
qt_event.buttons(),
qt_event.modifiers());
adapted_qt_event.setAccepted(false);
QCoreApplication::sendEvent(internal, &adapted_qt_event);
return adapted_qt_event.isAccepted();
return QWindowSystemInterface::handleMouseEvent<
QWindowSystemInterface::SynchronousDelivery>(internal,
qt_event.position() - internal->position(),
qt_event.globalPosition(),
qt_event.buttons(),
qt_event.button(),
qt_event.type(),
qt_event.modifiers());
}

bool motion(motion_event const& event) override
Expand Down
1 change: 1 addition & 0 deletions como/input/wayland/kglobalaccel/runtime/global_accel_d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <como/input/logging.h>

#include <KGlobalAccel>
#include <QDBusConnection>
#include <QDBusMetaType>
#include <QDBusObjectPath>
#include <QMetaMethod>
Expand Down
2 changes: 1 addition & 1 deletion como/input/wayland/kglobalaccel/runtime/global_accel_d.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

#include <KGlobalAccel>
#include <KGlobalShortcutInfo>
#include <QDBusContext>
#include <QList>
#include <QStringList>
#include <QtDBus>

struct KGlobalAccelDPrivate;

Expand Down
6 changes: 4 additions & 2 deletions como/input/xkb/keyboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,7 @@ void keyboard::update_modifiers()
constexpr auto is_active = xkb_state_mod_index_is_active;
auto mods = Qt::KeyboardModifiers();

if (is_active(state, modifiers_indices.shift, XKB_STATE_MODS_EFFECTIVE) == 1
|| is_active(state, modifiers_indices.caps, XKB_STATE_MODS_EFFECTIVE) == 1) {
if (is_active(state, modifiers_indices.shift, XKB_STATE_MODS_EFFECTIVE) == 1) {
mods |= Qt::ShiftModifier;
}
if (is_active(state, modifiers_indices.alt, XKB_STATE_MODS_EFFECTIVE) == 1) {
Expand Down Expand Up @@ -268,6 +267,9 @@ Qt::KeyboardModifiers keyboard::modifiers_relevant_for_global_shortcuts(uint32_t
if (is_active(state, modifiers_indices.meta, XKB_STATE_MODS_EFFECTIVE) == 1) {
mods |= Qt::MetaModifier;
}
if (keysym >= XKB_KEY_KP_Space && keysym <= XKB_KEY_KP_9) {
mods |= Qt::KeypadModifier;
}

auto consumed_mods = qt_modifiers_consumed;
if ((mods & Qt::ShiftModifier) && (consumed_mods == Qt::ShiftModifier)) {
Expand Down
4 changes: 2 additions & 2 deletions como/render/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ qt6_add_dbus_adaptor(render_dbus_SRCS
como::render::dbus::compositing_qobject
)
qt6_add_dbus_adaptor(render_dbus_SRCS
dbus/org.kde.kwin.ColorCorrect.xml
dbus/org.kde.KWin.NightLight.xml
post/color_correct_dbus_interface.h
como::render::post::color_correct_dbus_interface
)
Expand Down Expand Up @@ -300,7 +300,7 @@ install(
)
install(
FILES
dbus/org.kde.kwin.ColorCorrect.xml
dbus/org.kde.KWin.NightLight.xml
dbus/org.kde.kwin.Compositing.xml
effect/interface/org.kde.kwin.Effects.xml
DESTINATION
Expand Down
Loading