Bug 368827 - Using the KWin Resize keyboard shortcut, all keypresses are sent into the window during the resize
Summary: Using the KWin Resize keyboard shortcut, all keypresses are sent into the win...
Status: CONFIRMED
Alias: None
Product: kwin
Classification: Plasma
Component: core (show other bugs)
Version: 5.7.5
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL: https://invent.kde.org/plasma/kwin/-/...
Keywords:
: 363863 372952 406017 444817 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-09-15 03:21 UTC by andydecleyre
Modified: 2022-02-11 13:27 UTC (History)
14 users (show)

See Also:
Latest Commit:
Version Fixed In:
mgraesslin: Wayland-
mgraesslin: X11+


Attachments
Demonstration Video (1.14 MB, video/x-matroska)
2016-09-15 03:31 UTC, andydecleyre
Details

Note You need to log in before you can comment on or make changes to this bug.
Description andydecleyre 2016-09-15 03:21:22 UTC
When using the Resize keyboard shortcut for KWin, keypresses such as the cursor keys, Enter, and Esc should be swallowed by KWin's resizing operation, but are instead sent into the application window, affecting the application. Sometimes these keys _also_ affect the resizing operation (as they should), and sometimes they don't. The only reliable way to exit the resize operation is to use the mouse, defeating the purpose of the keyboard shortcut.

Reproducible: Always

Steps to Reproduce:
1. Open a window
2. Trigger the KWin Resize shortcut
3. Use cursor keys / Enter / Esc

Actual Results:  
The cursor keys / Enter / Esc keypresses affect the application window as if you were not in the middle of a resize operation, meaning different results depending on the application. There is no keyboard-only method for stopping the resizing operation without closing the window or quitting the application.

Expected Results:  
During the resize operation, the keypresses should guide the resize itself, and not affect the application window's internal state or the application run state.
Comment 1 andydecleyre 2016-09-15 03:29:55 UTC
I've attached a demonstration video. The keypresses are not reported correctly (vokoscreen bug I guess); what it reports as "s" is cursor-right, "r" is cursor-up, "q" is cursor-left.

In the video's case, it seems that hitting Enter _did_ stop the resize operation. That is not consistent. But you can clearly see, regardless, that the keypresses are inappropriately affecting the application being resized.
Comment 2 andydecleyre 2016-09-15 03:31:32 UTC
Created attachment 101091 [details]
Demonstration Video
Comment 3 Martin Flöser 2016-09-15 06:06:46 UTC
How do you trigger the resize shortcut?
Comment 4 andydecleyre 2016-09-15 06:09:52 UTC
Meta+R

As I have it defined via the Global Keyboard Shortcuts KCM.
Comment 5 Martin Flöser 2016-09-15 07:10:21 UTC
Thanks that's what I wanted to know.

For the record: this problem is fixed on Wayland. On X11 it looks like the grab fails. We have a few places where we are reported that the grab fails.
Comment 6 Christoph Feck 2016-11-30 14:18:23 UTC
*** Bug 372952 has been marked as a duplicate of this bug. ***
Comment 7 andydecleyre 2017-07-15 19:28:05 UTC
The same problem exists for moving the window, causing unreliable behavior (often closing the window meant to be moved) when hitting Enter or Escape to end the move operation.

I think it would be better to remove the resize and move keyboard shortcuts as possibilities entirely than to keep them in this broken state. They can return if anyone ever fixes them. As it is now, it's dangerous and confusing.
Comment 8 Ahmad Samir 2018-02-20 15:31:59 UTC
*** Bug 363863 has been marked as a duplicate of this bug. ***
Comment 9 Shlomi Fish 2018-04-14 09:07:20 UTC
(In reply to andydecleyre from comment #7)
> The same problem exists for moving the window, causing unreliable behavior
> (often closing the window meant to be moved) when hitting Enter or Escape to
> end the move operation.
> 

This also happens here in plasma 5 on mageia v7 after doing alt+f3 and selecting the move or resize options. The arrow keys are passed to the VLC window.

> I think it would be better to remove the resize and move keyboard shortcuts
> as possibilities entirely than to keep them in this broken state. They can
> return if anyone ever fixes them. As it is now, it's dangerous and confusing.

God, why? Just fix them - do not remove functionality and accessibility.
Comment 10 Alexander Mentyu 2018-08-08 17:17:20 UTC
Pressing resizing shortcut, increasing size of XWayland window is registering Enter key press with first time and resizing operation ends

Pressing resizing shortcut, decreasing size of XWayland window is registering Enter key press with second time and resizing operation stops after pressing  Enter key second time, the XWayland window becomes half-transparent and closes only after second close button press, the window stays rendered half transparent on screen but it has no Task Manager task displayed

Pressing resizing shortcut, decreasing or increasing size of Wayland window almost always crashes the Plasma, sometimes the window becomes half transparent and Enter key registering with second time, resizing operation stops and the window closes after second close button press, and very rarely resize operation ends normally without half transparency with first Enter key press

Tried with VLC and Dolphin apps in Wayland

Distribution: KDE neon Developer Edition
Kernel: 4.15.0-29-generic
Plasma: 5.13.80
Apps: 18.11.70
Qt: 5.11.1
Frameworks: 5.48.0
Comment 11 Alexander Mentyu 2018-08-08 18:07:55 UTC
Pressing Esc key is registered with first time after increasing/decreasing size of XWayland window upon resizing operation, resizing operation stops after first Esc key press

Pressing Esc key is registered with first time after increasing size of Wayland window upon resizing operation, resizing operation stops after first Esc key press

Pressing Esc key is registered with second time after decreasing size of Wayland window upon resizing operation, resizing operation stops after second Esc key press, the window becomes half transparent

Tried with VLC and Dolphin apps in Wayland
Comment 12 Martin Flöser 2018-08-08 19:02:13 UTC
Any issue on Wayland is a different issue. This bug is about X11.
Comment 13 Patrick Silva 2019-04-16 23:20:52 UTC
*** Bug 406017 has been marked as a duplicate of this bug. ***
Comment 14 saif1988 2020-02-25 08:01:02 UTC
This bug is still in Kubuntu by 5.16.5
I wish this would be fixed
Comment 15 Paul Worrall 2021-11-02 12:48:02 UTC
*** Bug 444817 has been marked as a duplicate of this bug. ***
Comment 16 Ian Schwarz 2022-02-11 13:25:13 UTC
This is still a problem.