Introduce the concept of an internal window system independent id
ClosedPublic

Authored by graesslin on Nov 18 2018, 7:19 PM.

Details

Summary

For supporting Wayland windows in the kwin_rules_dialog we need a way to
pass a window id for Wayland windows to the dialog. This id needs to be
sent to the dbus interface to query window information just like the
interactive query. For Wayland windows we don't really have a window id
and it would require to also pass the windowing system to
kwin_rules_dialog and back through the dbus interface.

To not complicate things this change introduces a windowing system
independent id based on UUID. This could in future also be used
internally for areas where it's window id based and used in both
windowing systems.

Test Plan

Adjusted test cases to verify the uuid is generated and passed to Deleted

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 18 2018, 7:19 PM
Restricted Application added a project: KWin. · View Herald TranscriptNov 18 2018, 7:19 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
graesslin requested review of this revision.Nov 18 2018, 7:19 PM
zzag added a subscriber: zzag.Nov 18 2018, 9:06 PM
zzag added inline comments.
autotests/integration/x11_client_test.cpp
136–141

Is it a good place for this test? It looks like this test verifies some caption stuff.

graesslin added inline comments.Nov 19 2018, 5:20 AM
autotests/integration/x11_client_test.cpp
136–141

No, it's not. Somehow I followed the ShellClient test and assumed the first test method is generic. Will move to testX11WindowId

graesslin updated this revision to Diff 45903.Nov 20 2018, 5:04 PM

Move the X11 test

zzag accepted this revision.Nov 20 2018, 5:39 PM

Could you please also add qRegisterMetaType<KWn::Deleted *>() for both testX11Client and testShellClient?

This revision is now accepted and ready to land.Nov 20 2018, 5:39 PM
In D16986#363203, @zzag wrote:

Could you please also add qRegisterMetaType<KWn::Deleted *>() for both testX11Client and testShellClient?

Sure. I haven't done that yet as it's actually not needed for the test. But yeah it creates a runtime warning.

davidedmundson accepted this revision.Nov 21 2018, 5:21 PM
This revision was automatically updated to reflect the committed changes.