[xwl] Add Xwayland interface class
ClosedPublic

Authored by romangg on Sep 11 2018, 11:20 AM.

Details

Summary

Adds an interface class to access Xwayland members from within KWin core.

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.
romangg requested review of this revision.Sep 11 2018, 11:20 AM
romangg created this revision.
romangg updated this revision to Diff 42012.Sep 20 2018, 9:17 PM

Rebase on master.

Restricted Application added a project: KWin. · View Herald TranscriptSep 20 2018, 9:17 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript

It seems like you're just recreating KWIN_SINGLETON

xwl/xwayland.h
43

I don't understand. What does this inheritance do that this existing method doesn't do

davidedmundson requested changes to this revision.Oct 5 2018, 12:20 AM
This revision now requires changes to proceed.Oct 5 2018, 12:20 AM

It seems like you're just recreating KWIN_SINGLETON

I tried to use KWIN_SINGLETON but its macros do not work with inheritance.

xwl/xwayland.h
43

XwaylandIface is compiled into KWin core while class Xwayland is only compiled into the kwin_wayland binary.

romangg updated this revision to Diff 48527.Jan 2 2019, 12:18 PM

Rebase on master/changes.

zzag added a subscriber: zzag.Jan 2 2019, 2:35 PM

Stupid question: why do we need XwaylandIface?

In D15419#385156, @zzag wrote:

Stupid question: why do we need XwaylandIface?

Such that we can compile Xwayland class only into the Wayland binary, not into KWin core.

zzag added a comment.EditedJan 7 2019, 3:24 PM

Oh, I didn't notice an inline comment that explains why.

xwl/xwayland_iface.h
30 ↗(On Diff #48527)

Please follow coding style, no short names.

zzag requested changes to this revision.Feb 6 2019, 11:41 AM
zzag added inline comments.
xwl/xwayland_iface.cpp
22 ↗(On Diff #48527)

namespace KWin
{

26 ↗(On Diff #48527)

XwaylandInterface *XwaylandInterface::self()
{
}

xwl/xwayland_iface.h
30 ↗(On Diff #48527)

XwaylandInterface

42 ↗(On Diff #48527)

inline XwaylandInterface *xwayland()
{
}

This revision now requires changes to proceed.Feb 6 2019, 11:41 AM
This revision was not accepted when it landed; it landed in state Needs Revision.Tue, Feb 19, 11:59 AM
This revision was automatically updated to reflect the committed changes.
romangg marked 5 inline comments as done.