Bug 386043 - Switch window between same application sometimes does not work.
Summary: Switch window between same application sometimes does not work.
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: tabbox (show other bugs)
Version: 5.11.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL: https://phabricator.kde.org/D8661
Keywords: regression
: 386411 386539 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-10-21 22:39 UTC by Weng Xuetian
Modified: 2017-11-22 15:45 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.11.4
Sentry Crash Report:
mgraesslin: ReviewRequest+


Attachments
Dolphin window xprop (65.86 KB, text/plain)
2017-10-22 21:59 UTC, Weng Xuetian
Details
Another dolphin window xprop (65.80 KB, text/plain)
2017-10-22 21:59 UTC, Weng Xuetian
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Weng Xuetian 2017-10-21 22:39:05 UTC
To reproduce:
1. Open multiple dolphin window
2. Alt + `
3. only current dolphin is displayed.

Currently I noticed that kdevelop, konsole, dolphin doesn't not work with Alt+`. While kwrite or firefox works.

AFAIK, everything works in Plasma 5.10.x.
Comment 1 Martin Flöser 2017-10-22 04:41:03 UTC
Please provide output of xprop for all dolphin windows.
Comment 2 Tony 2017-10-22 18:45:16 UTC
Ummm, i get this one but on wayland and it only works for firefox nightly (package downloaded directly from mozilla). I tried with dolphin, kate, konsole, mpv, okular, none of them showed more than 1 window when hitting alt+`.
Comment 3 Weng Xuetian 2017-10-22 21:59:14 UTC
Created attachment 108517 [details]
Dolphin window xprop
Comment 4 Weng Xuetian 2017-10-22 21:59:49 UTC
Created attachment 108518 [details]
Another dolphin window xprop
Comment 5 Weng Xuetian 2017-10-22 22:33:19 UTC
(In reply to Martin Flöser from comment #1)
> Please provide output of xprop for all dolphin windows.

I checked the code change a little bit. I assume the problem is introduced by 5d9027b110.

It seems that belongToSameApplication is focusing on the "same instance", dolphin at least would fail on the pid check.

At least I'd expect the alt + ` works like the task manager's grouping.
Comment 6 Martin Flöser 2017-10-23 05:02:58 UTC
Yeah, I also already considered that change.
Comment 7 Martin Flöser 2017-11-01 07:32:27 UTC
*** Bug 386411 has been marked as a duplicate of this bug. ***
Comment 8 Martin Flöser 2017-11-05 07:43:24 UTC
*** Bug 386539 has been marked as a duplicate of this bug. ***
Comment 9 Martin Flöser 2017-11-05 09:20:07 UTC
Fix in https://phabricator.kde.org/D8661
Comment 10 Martin Flöser 2017-11-16 19:34:21 UTC
Git commit 1ae7990a959ce2c3fad0a6aef684cf058b07cf1e by Martin Flöser.
Committed on 16/11/2017 at 19:33.
Pushed by graesslin into branch 'Plasma/5.11'.

Allow a cross-process check for same applications

Summary:
Commit 5d9027b110 introduced a regression in TabBox by using the generic
framework inside KWin to test for same application. What I did not
consider was that the code in TabBox was "broken by design". It didn't
use the generic check as that is too strict and considers windows from
different processes as not belonging to the same application. But this
is not wanted in the case of TabBox.

On the other hand the change itself is an improvement to also support
Wayland in a better way and not have special handling situations. Thus
just reverting would not help.

Instead this change addresses the problem by extending the internal API
and to allow more adjustements. So far there was already an
"active_hack" boolean flag. This is extended to proper flags with an
additional flag to allow cross application checks.

The checks in Client which would filter out different applications check
for this flag and are skipped if set. In addition ShellClient also adds
support for this flag and compares for the desktop file name.

Thus we get in TabBox the same behavior as before with the advantage of
having a better shared code base working on both X11 and Wayland.
FIXED-IN: 5.11.4

Test Plan:
Started two kwrite processes on X11, clicked new in one of them,
used Alt+` and verified that there are three windows shown.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8661

M  +2    -2    abstract_client.cpp
M  +8    -4    abstract_client.h
M  +4    -4    activation.cpp
M  +2    -2    client.cpp
M  +2    -2    client.h
M  +6    -4    group.cpp
M  +7    -3    shell_client.cpp
M  +1    -1    shell_client.h
M  +2    -2    tabbox/tabbox.cpp

https://commits.kde.org/kwin/1ae7990a959ce2c3fad0a6aef684cf058b07cf1e
Comment 11 Martin Flöser 2017-11-22 15:45:02 UTC
*** Bug 387208 has been marked as a duplicate of this bug. ***