Bug 480538 - KDE6-rc1 Alternative window decorations breaking title bars
Summary: KDE6-rc1 Alternative window decorations breaking title bars
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: decorations (show other bugs)
Version: 5.92.0
Platform: Other Linux
: NOR major
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2024-01-30 12:53 UTC by Edoardo Lolletti
Modified: 2024-02-06 11:41 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Edoardo Lolletti 2024-01-30 12:53:14 UTC
SUMMARY
When using a custom window decoration (for example the default shipped plastik one), window title bars break

STEPS TO REPRODUCE
1. Change window decoration from the settings

OBSERVED RESULT
Once the window decoration is changed from the default Breeze one, the title bar will stop responding to actions like double clicking on it to maximize/restore a window, also right clicking on the title bar of a window on a secondary monitor, will open the window menu on the other monitor.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora Linux 40
KDE Plasma Version: 5.92.0
KDE Frameworks Version: 5.248.0
Qt Version: 6.6.1

ADDITIONAL INFORMATION
This happens on wayland, i don't know if it also happens on X11, but currently I'm testing using a fedora Rawhide live image that doesn't ship with an X11 session.
Comment 1 Vlad Zahorodnii 2024-02-01 11:55:12 UTC
aurorae accepts button release events regardless of what's actually clicked. This cancel the double click timer.
Comment 2 Vlad Zahorodnii 2024-02-01 17:40:17 UTC
/*!
    Handle \a event on behalf of this delivery agent's window or subscene.
*/
void QQuickDeliveryAgentPrivate::handleMouseEvent(QMouseEvent *event)
{
    Q_Q(QQuickDeliveryAgent);
    // We generally don't want OS-synthesized mouse events, because Qt Quick does its own touch->mouse synthesis.
    // But if the platform converts long-press to right-click, it's ok to react to that,
    // unless the user has opted out by setting QT_QUICK_ALLOW_SYNTHETIC_RIGHT_CLICK=0.
    if (event->source() == Qt::MouseEventSynthesizedBySystem &&
            !(event->button() == Qt::RightButton && allowSyntheticRightClick())) {
        event->accept();
        return;
    }


Qt has this code that accepts all button release events
Comment 3 Bug Janitor Service 2024-02-01 18:49:08 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/5086
Comment 4 Zamundaaa 2024-02-02 01:00:21 UTC
Git commit 93b9fdd391c7b19bb61b9b9ee2ba6bc3890af5ff by Xaver Hugl, on behalf of Vlad Zahorodnii.
Committed on 02/02/2024 at 01:00.
Pushed by zamundaaa into branch 'master'.

effect: Fix initialization of QEvent::isAccepted() in cloned events in OffscreenQuickView

QEvent::isAccepted() is initialized to true by default.

M  +6    -0    src/effect/offscreenquickview.cpp

https://invent.kde.org/plasma/kwin/-/commit/93b9fdd391c7b19bb61b9b9ee2ba6bc3890af5ff
Comment 5 Zamundaaa 2024-02-02 01:19:22 UTC
Git commit 8ed28586d933e20e14e4112b23666238a3eec14e by Xaver Hugl, on behalf of Vlad Zahorodnii.
Committed on 02/02/2024 at 01:06.
Pushed by zamundaaa into branch 'Plasma/6.0'.

effect: Fix initialization of QEvent::isAccepted() in cloned events in OffscreenQuickView

QEvent::isAccepted() is initialized to true by default.
(cherry picked from commit 93b9fdd391c7b19bb61b9b9ee2ba6bc3890af5ff)

M  +6    -0    src/effect/offscreenquickview.cpp

https://invent.kde.org/plasma/kwin/-/commit/8ed28586d933e20e14e4112b23666238a3eec14e
Comment 6 Edoardo Lolletti 2024-02-05 21:54:53 UTC
Tested the latest KDE Neon live image, and can confirm that the double click now works, but the issue with the right click menu still remains.
Comment 7 Vlad Zahorodnii 2024-02-06 11:41:19 UTC
Right clicking is tracked in https://bugs.kde.org/show_bug.cgi?id=480864