Bug 418938 - Gain focus when clicking the maximization button
Summary: Gain focus when clicking the maximization button
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 5.18.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-16 20:06 UTC by avlas
Modified: 2023-09-06 10:38 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 avlas 2020-03-16 20:06:12 UTC
SUMMARY

I am using click to focus in Kwin and I think clicking the maximization button should also automatically gain focus (assumed the window didn't have it). Perhaps it's just me but I find default Kwin's behavior quite counterintuitive maximizing without gaining focus.

STEPS TO REPRODUCE

1. Open two windows
2. Set focus on one
3. Click the maximization button of the other

OBSERVED RESULT

The Maximized window does not automatically gain focus and appears below the window under focus

EXPECTED RESULT

The maximized window would also gain focus (to be on top of the other window). 

Also, under Kwin's logic to focus on click, shouldn't the click on the maximization button also count as a focus on click?

For obvious reasons, this does not apply to minimization and close buttons, but I think it would make sense for all other clicks in the window (including other buttons), and especially for maximization.
Comment 1 Christoph Feck 2020-04-09 20:25:46 UTC
Since you can click into the window to gain focus, this shouldn't be changed unless it is made configurable. Otherwise, you wouldn't be able to keep the existing behaviour.
Comment 2 avlas 2020-04-09 20:38:52 UTC
(In reply to Christoph Feck from comment #1)
> Since you can click into the window to gain focus, this shouldn't be changed
> unless it is made configurable. Otherwise, you wouldn't be able to keep the
> existing behaviour.

This requires the counterintuitive process of clicking elsewhere in the window before maximizing.

Most of the times the user may not even realize that the window is not on focus in the first place, so the user cannot do that until it's too late (perhaps this is not usually the case for the default breeze decoration, but for most other themes, the difference between active and inactive windows is much more subtle).

Furthermore, your response seems to recognize that current behavior may be a feature worth keeping, but I fail to see a use case for maximazing a window that appears below others. If you have some, I'd like to know.
Comment 3 Nate Graham 2020-04-15 03:14:54 UTC
I kind of agree, yeah. I also don't see the use case of maximizing a non-active window. The entire point of maximizing a window is to be able to focus on it, instead of other windows.
Comment 4 Benjamin Port 2020-07-17 09:19:55 UTC
Git commit 73e38aa85966692316d6c4dbc9ae559790bb519c by Benjamin Port.
Committed on 17/07/2020 at 09:19.
Pushed by bport into branch 'change-maximize-adjust'.

When maximizing a window raise client and gain focus

M  +1    -0    abstract_client.cpp

https://invent.kde.org/plasma/kwin/commit/73e38aa85966692316d6c4dbc9ae559790bb519c
Comment 5 David Edmundson 2023-09-06 10:38:22 UTC
This bug was reported against an outdated version of KWin. We have made many changes since the. 
If the issue persists in newer versions can you reopen the bug report updating the version number.