KWin
Loading...
Searching...
No Matches
Signals | Public Member Functions | Friends | List of all members
KWin::XdgForeignV2Interface Class Reference

#include <xdgforeign_v2.h>

Inheritance diagram for KWin::XdgForeignV2Interface:

Signals

void transientChanged (KWin::SurfaceInterface *child, KWin::SurfaceInterface *parent)
 

Public Member Functions

 XdgForeignV2Interface (Display *display, QObject *parent=nullptr)
 
 ~XdgForeignV2Interface () override
 
SurfaceInterfacetransientFor (SurfaceInterface *surface)
 
XdgExportedSurfaceexportSurface (SurfaceInterface *surface)
 

Friends

class XdgExporterV2Interface
 
class XdgImporterV2Interface
 

Detailed Description

This class encapsulates the server side logic of the XdgForeign protocol. a process can export a surface to be identifiable by a server-wide unique string handle, and another process can in turn import that surface, and set it as transient parent for one of its own surfaces. This parent relationship is traced by the transientChanged signal and the transientFor method.

Definition at line 44 of file xdgforeign_v2.h.

Constructor & Destructor Documentation

◆ XdgForeignV2Interface()

KWin::XdgForeignV2Interface::XdgForeignV2Interface ( Display * display,
QObject * parent = nullptr )

Definition at line 49 of file xdgforeign_v2.cpp.

◆ ~XdgForeignV2Interface()

KWin::XdgForeignV2Interface::~XdgForeignV2Interface ( )
override

Definition at line 55 of file xdgforeign_v2.cpp.

Member Function Documentation

◆ exportSurface()

XdgExportedSurface * KWin::XdgForeignV2Interface::exportSurface ( SurfaceInterface * surface)

Exports the given surface without creating a Wayland interface object.

Parameters
surfaceThe surface to export
Returns
The handle, this can then be passed to other clients.

Definition at line 64 of file xdgforeign_v2.cpp.

◆ transientChanged

void KWin::XdgForeignV2Interface::transientChanged ( KWin::SurfaceInterface * child,
KWin::SurfaceInterface * parent )
signal

A surface got a new imported transient parent

Parameters
parentis the surface exported by one client and imported into another, which will act as parent.
childis the surface that the importer client did set as child of the surface that it imported. If one of the two paramenters is nullptr, it means that a previously relation is not valid anymore and either one of the surfaces has been unmapped, or the parent surface is not exported anymore.

◆ transientFor()

SurfaceInterface * KWin::XdgForeignV2Interface::transientFor ( SurfaceInterface * surface)

If a client did import a surface and set one of its own as child of the imported one, this returns the mapping.

Parameters
surfacethe child surface we want to search an imported transientParent for.
Returns
the transient parent of the surface, if found, nullptr otherwise.

Definition at line 59 of file xdgforeign_v2.cpp.

Friends And Related Symbol Documentation

◆ XdgExporterV2Interface

friend class XdgExporterV2Interface
friend

Definition at line 79 of file xdgforeign_v2.h.

◆ XdgImporterV2Interface

friend class XdgImporterV2Interface
friend

Definition at line 80 of file xdgforeign_v2.h.


The documentation for this class was generated from the following files: