Bug 482467 - Spectacle's "Rectangular Region" overlay isn't initially focused when opening, making it interact badly with "Activate and raise" left click window action
Summary: Spectacle's "Rectangular Region" overlay isn't initially focused when opening...
Status: RESOLVED FIXED
Alias: None
Product: Spectacle
Classification: Applications
Component: General (show other bugs)
Version: 24.02.0
Platform: NixOS Linux
: NOR normal
Target Milestone: ---
Assignee: Noah Davis
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2024-03-05 13:30 UTC by Marco Rebhan
Modified: 2024-05-08 22:03 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 24.05


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marco Rebhan 2024-03-05 13:30:43 UTC
SUMMARY
When Plasma is set to "Activate and raise" windows instead of "Activate, raise and pass click", Spectacle's "Rectangular Region" capture overlay requires an initial click before a region can be selected.

STEPS TO REPRODUCE
1. In System Settings > Window Management > Window Behavior > Window Actions, set Left click to "Activate and raise"
2. Open Spectacle, capture rectangular region
3. Try to draw rectangle

OBSERVED RESULT
The overlay needs an initial click before being able to interact with it

EXPECTED RESULT
The overlay should immediately have focus so it can be interacted with

SOFTWARE/OS VERSIONS
Operating System: NixOS 24.05
KDE Plasma Version: 6.0.0
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.6.18 (64-bit)
Graphics Platform: Wayland
Processors: 24 × 13th Gen Intel® Core™ i7-13700F
Memory: 62.7 GiB of RAM
Graphics Processor: AMD Radeon RX 6800 XT

ADDITIONAL INFORMATION
Comment 1 Bug Janitor Service 2024-05-05 20:32:25 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/spectacle/-/merge_requests/362
Comment 2 Noah Davis 2024-05-05 21:25:58 UTC
Git commit d3973de254fe7b0f89c9f320836832fa4f0dd7fc by Noah Davis.
Committed on 05/05/2024 at 20:32.
Pushed by ndavis into branch 'master'.

Raise and activate capture windows when shown

This code is in QML instead of C++ because you can't get the global mouse pos from QCursor on wayland. We need to get the mouse pos within the window and QML was the easiest place to get it.

M  +12   -0    src/Gui/ImageCaptureOverlay.qml
M  +12   -0    src/Gui/VideoCaptureOverlay.qml

https://invent.kde.org/graphics/spectacle/-/commit/d3973de254fe7b0f89c9f320836832fa4f0dd7fc
Comment 3 Noah Davis 2024-05-05 21:40:24 UTC
Git commit 3e1bd55dfac7defe9870341dfdc17b52b6ae9fd9 by Noah Davis.
Committed on 05/05/2024 at 21:40.
Pushed by ndavis into branch 'release/24.05'.

Raise and activate capture windows when shown

This code is in QML instead of C++ because you can't get the global mouse pos from QCursor on wayland. We need to get the mouse pos within the window and QML was the easiest place to get it.

(cherry picked from commit d3973de254fe7b0f89c9f320836832fa4f0dd7fc)

M  +12   -0    src/Gui/ImageCaptureOverlay.qml
M  +12   -0    src/Gui/VideoCaptureOverlay.qml

https://invent.kde.org/graphics/spectacle/-/commit/3e1bd55dfac7defe9870341dfdc17b52b6ae9fd9