Bug 441287 - [Wayland] Action assigned to a screen corner/edge should not be triggered while we select an area to take a screenshot with Spectacle
Summary: [Wayland] Action assigned to a screen corner/edge should not be triggered whi...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.26.90
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 442633 460737 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-08-21 10:59 UTC by Patrick Silva
Modified: 2023-05-12 18:02 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2021-08-21 10:59:49 UTC
SUMMARY
This issue affects Wayland session of Arch and neon unstable.

STEPS TO REPRODUCE
1. use Wayland session
2. open Spectacle by pressing printscreen key
3. set capture mode to "Rectangular region"
4. click on "Take a new screenshot" button
5. select an area on the screen by clicking on the middle of the screen
and moving cursor to upper left corner

OBSERVED RESULT
present windows effect is triggered when you move cursor to upper left corner

EXPECTED RESULT
Action assigned to a screen corner/edge should not be triggered while we select an area to take a screenshot with Spectacle

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.22.4
KDE Frameworks Version: 5.85.0
Qt Version: 5.15.2
Graphics Platform: Wayland
Comment 1 Nate Graham 2021-08-23 22:21:21 UTC
Can confirm.
Comment 2 guimarcalsilva 2021-08-24 07:02:27 UTC
Interesting. Maybe the last bug I reported could be technically related to this one? I'm not sure. https://bugs.kde.org/show_bug.cgi?id=441464

Mine is a bit different since it's especifically about fullscreen games that capture the mouse cursor. My guess is that in both cases Wayland needs a way to know when it should hand over the cursor control to the program.
Comment 3 Patrick Silva 2021-09-19 11:09:51 UTC
*** Bug 442633 has been marked as a duplicate of this bug. ***
Comment 4 Vlad Zahorodnii 2021-09-20 09:05:14 UTC
This requires a screen edge inhibiting protocol.
Comment 5 Bharadwaj Raju 2021-10-05 16:17:36 UTC
(In reply to Vlad Zahorodnii from comment #4)
> This requires a screen edge inhibiting protocol.

Any hints on where to start if I wanted to create that protocol?
Comment 6 tgnff242 2022-02-10 03:21:50 UTC
This also happens when, for example, you grab and move the scrollbar to go quickly to the start/end of a page/document in an application window and get outside of the boundaries of the application and hit a hot corner, which likely happens more often.
Comment 7 Vlad Zahorodnii 2022-02-10 07:35:22 UTC
(In reply to Bharadwaj Raju from comment #5)
> (In reply to Vlad Zahorodnii from comment #4)
> > This requires a screen edge inhibiting protocol.
> 
> Any hints on where to start if I wanted to create that protocol?

all relevant screen edge code is in src/screenedge.cpp in kwin repo. plasma specific protocols can be found over here https://invent.kde.org/libraries/plasma-wayland-protocols/

I think the wayland protocol needs a factory and an inhibitor object, e.g.

* kde_screen_edge_inhibitor_manager_v1
* kde_screen_edge_inhibitor_v1

the steps to implement the wayland protocol would be: add an xml file in plasma-wayland-protocols, implement it in kwayland-server, and wire it in in kwin

also, feel free to ask questions about implementing wayland protocols in #kde-kwin on libera or matrix
Comment 8 Patrick Silva 2022-10-20 13:06:54 UTC
*** Bug 460737 has been marked as a duplicate of this bug. ***
Comment 9 Patrick Silva 2023-05-12 18:02:32 UTC
Cannot reproduce with Spectacle 23.04.1.

Operating System: Arch Linux 
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.105.0
Qt Version: 5.15.9
Graphics Platform: Wayland