Allow a cross-process check for same applications
ClosedPublic

Authored by graesslin on Nov 5 2017, 9:19 AM.

Details

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.

BUG: 386043
FIXED-IN: 5.11.3

Test Plan

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

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
graesslin created this revision.Nov 5 2017, 9:19 AM
Restricted Application added a project: KWin. · View Herald TranscriptNov 5 2017, 9:19 AM
Restricted Application added subscribers: kwin, plasma-devel. · View Herald Transcript
davidedmundson accepted this revision.Nov 15 2017, 7:29 PM
This revision is now accepted and ready to land.Nov 15 2017, 7:29 PM
This revision was automatically updated to reflect the committed changes.