Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
KWin
Commits
61a6ee4b
Commit
61a6ee4b
authored
Mar 16, 2021
by
Vlad Zahorodnii
Browse files
Rename some methods in xdg-foreign classes
parent
1f83657c
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/wayland/xdgforeign_v2_interface.cpp
View file @
61a6ee4b
...
...
@@ -167,7 +167,7 @@ SurfaceInterface *XdgImporterV2Interface::transientFor(SurfaceInterface *surface
if
(
it
==
d
->
parents
.
constEnd
())
{
return
nullptr
;
}
return
(
*
it
)
->
parentResour
ce
();
return
(
*
it
)
->
surfa
ce
();
}
void
XdgImporterV2InterfacePrivate
::
zxdg_importer_v2_destroy
(
Resource
*
resource
)
...
...
@@ -185,7 +185,7 @@ void XdgImporterV2InterfacePrivate::zxdg_importer_v2_import_toplevel(Resource *r
return
;
}
SurfaceInterface
*
surface
=
exp
->
parentResour
ce
();
SurfaceInterface
*
surface
=
exp
->
surfa
ce
();
if
(
!
surface
)
{
zxdg_imported_v2_send_destroyed
(
resource
->
handle
);
return
;
...
...
@@ -221,7 +221,7 @@ void XdgImporterV2InterfacePrivate::zxdg_importer_v2_import_toplevel(Resource *r
parents
[
child
]
=
XdgImported
;
children
[
XdgImported
]
=
child
;
SurfaceInterface
*
parent
=
XdgImported
->
parentResour
ce
();
SurfaceInterface
*
parent
=
XdgImported
->
surfa
ce
();
emit
q
->
transientChanged
(
child
,
parent
);
//child surface destroyed
...
...
@@ -232,7 +232,7 @@ void XdgImporterV2InterfacePrivate::zxdg_importer_v2_import_toplevel(Resource *r
KWaylandServer
::
XdgImportedV2Interface
*
parent
=
*
it
;
children
.
remove
(
*
it
);
parents
.
erase
(
it
);
emit
q
->
transientChanged
(
nullptr
,
parent
->
parentResour
ce
());
emit
q
->
transientChanged
(
nullptr
,
parent
->
surfa
ce
());
}
});
});
...
...
@@ -263,17 +263,16 @@ XdgImporterV2InterfacePrivate::XdgImporterV2InterfacePrivate(XdgImporterV2Interf
}
XdgExportedV2Interface
::
XdgExportedV2Interface
(
SurfaceInterface
*
surface
,
wl_resource
*
resource
)
:
QObject
(
nullptr
)
,
QtWaylandServer
::
zxdg_exported_v2
(
resource
)
,
surface
(
surface
)
:
QtWaylandServer
::
zxdg_exported_v2
(
resource
)
,
m_surface
(
surface
)
{
}
XdgExportedV2Interface
::~
XdgExportedV2Interface
()
=
default
;
SurfaceInterface
*
XdgExportedV2Interface
::
parentResour
ce
()
SurfaceInterface
*
XdgExportedV2Interface
::
surfa
ce
()
{
return
surface
;
return
m_
surface
;
}
void
XdgExportedV2Interface
::
zxdg_exported_v2_destroy
(
Resource
*
resource
)
...
...
@@ -290,7 +289,7 @@ void XdgExportedV2Interface::zxdg_exported_v2_destroy_resource(Resource *resourc
XdgImportedV2Interface
::
XdgImportedV2Interface
(
SurfaceInterface
*
surface
,
wl_resource
*
resource
)
:
QObject
(
nullptr
)
,
QtWaylandServer
::
zxdg_imported_v2
(
resource
)
,
surface
(
surface
)
,
m_
surface
(
surface
)
{
}
...
...
@@ -298,12 +297,12 @@ XdgImportedV2Interface::~XdgImportedV2Interface() = default;
SurfaceInterface
*
XdgImportedV2Interface
::
child
()
const
{
return
parentOf
.
data
()
;
return
m_child
;
}
SurfaceInterface
*
XdgImportedV2Interface
::
parentResource
()
SurfaceInterface
*
XdgImportedV2Interface
::
surface
()
const
{
return
surface
;
return
m_
surface
;
}
void
XdgImportedV2Interface
::
zxdg_imported_v2_set_parent_of
(
Resource
*
resource
,
wl_resource
*
surface
)
...
...
@@ -315,7 +314,7 @@ void XdgImportedV2Interface::zxdg_imported_v2_set_parent_of(Resource *resource,
return
;
}
parentOf
=
surf
;
m_child
=
surf
;
emit
childChanged
(
surf
);
}
...
...
src/wayland/xdgforeign_v2_interface_p.h
View file @
61a6ee4b
...
...
@@ -67,15 +67,14 @@ public:
explicit
XdgExportedV2Interface
(
SurfaceInterface
*
surface
,
wl_resource
*
resource
);
~
XdgExportedV2Interface
()
override
;
SurfaceInterface
*
parentResource
();
private:
SurfaceInterface
*
surface
;
SurfaceInterface
*
surface
();
protected:
void
zxdg_exported_v2_destroy
(
Resource
*
resource
)
override
;
void
zxdg_exported_v2_destroy_resource
(
Resource
*
resource
)
override
;
private:
SurfaceInterface
*
m_surface
;
};
class
XdgImportedV2Interface
:
public
QObject
,
QtWaylandServer
::
zxdg_imported_v2
...
...
@@ -86,19 +85,18 @@ public:
~
XdgImportedV2Interface
()
override
;
SurfaceInterface
*
child
()
const
;
SurfaceInterface
*
parentResource
()
;
SurfaceInterface
*
surface
()
const
;
Q_SIGNALS:
void
childChanged
(
KWaylandServer
::
SurfaceInterface
*
child
);
private:
SurfaceInterface
*
surface
;
QPointer
<
SurfaceInterface
>
parentOf
;
SurfaceInterface
*
m_
surface
;
QPointer
<
SurfaceInterface
>
m_child
;
protected:
void
zxdg_imported_v2_set_parent_of
(
Resource
*
resource
,
wl_resource
*
surface
)
override
;
void
zxdg_imported_v2_destroy
(
Resource
*
resource
)
override
;
void
zxdg_imported_v2_destroy_resource
(
Resource
*
resource
)
override
;
};
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment