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
2867b841
Commit
2867b841
authored
Nov 04, 2015
by
Marco Martin
Browse files
address last comments of review 125871
parent
29a4f496
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/wayland/plasmawindowmanagement_interface.cpp
View file @
2867b841
...
...
@@ -88,7 +88,7 @@ private:
static
void
setStateCallback
(
wl_client
*
client
,
wl_resource
*
resource
,
uint32_t
flags
,
uint32_t
state
);
static
void
setVirtualDesktopCallback
(
wl_client
*
client
,
wl_resource
*
resource
,
uint32_t
number
);
static
void
closeCallback
(
wl_client
*
client
,
wl_resource
*
resource
);
static
void
set
Task
GeometryCallback
(
wl_client
*
client
,
wl_resource
*
resource
,
wl_resource
*
panel
,
uint32_t
x
,
uint32_t
y
,
uint32_t
width
,
uint32_t
height
);
static
void
set
Minimized
GeometryCallback
(
wl_client
*
client
,
wl_resource
*
resource
,
wl_resource
*
panel
,
uint32_t
x
,
uint32_t
y
,
uint32_t
width
,
uint32_t
height
);
static
void
unsetMinimizedGeometryCallback
(
wl_client
*
client
,
wl_resource
*
resource
,
wl_resource
*
panel
);
static
Private
*
cast
(
wl_resource
*
resource
)
{
return
reinterpret_cast
<
Private
*>
(
wl_resource_get_user_data
(
resource
));
...
...
@@ -247,7 +247,7 @@ PlasmaWindowInterface *PlasmaWindowManagementInterface::createWindow(QObject *pa
const
struct
org_kde_plasma_window_interface
PlasmaWindowInterface
::
Private
::
s_interface
=
{
setStateCallback
,
setVirtualDesktopCallback
,
set
Task
GeometryCallback
,
set
Minimized
GeometryCallback
,
unsetMinimizedGeometryCallback
,
closeCallback
};
...
...
@@ -447,7 +447,7 @@ void PlasmaWindowInterface::Private::setStateCallback(wl_client *client, wl_reso
}
}
void
PlasmaWindowInterface
::
Private
::
set
Task
GeometryCallback
(
wl_client
*
client
,
wl_resource
*
resource
,
wl_resource
*
panel
,
uint32_t
x
,
uint32_t
y
,
uint32_t
width
,
uint32_t
height
)
void
PlasmaWindowInterface
::
Private
::
set
Minimized
GeometryCallback
(
wl_client
*
client
,
wl_resource
*
resource
,
wl_resource
*
panel
,
uint32_t
x
,
uint32_t
y
,
uint32_t
width
,
uint32_t
height
)
{
Q_UNUSED
(
client
)
Private
*
p
=
cast
(
resource
);
...
...
@@ -457,10 +457,14 @@ void PlasmaWindowInterface::Private::setTaskGeometryCallback(wl_client *client,
return
;
}
if
(
p
->
minimizedGeometries
.
value
(
panelSurface
)
==
QRect
(
x
,
y
,
width
,
height
))
{
return
;
}
p
->
minimizedGeometries
[
panelSurface
]
=
QRect
(
x
,
y
,
width
,
height
);
emit
p
->
q
->
minimizedGeometriesChanged
();
connect
(
panelSurface
,
&
QObject
::
destroyed
,
p
->
q
,
[
p
,
panelSurface
]
()
{
if
(
p
->
minimizedGeometries
.
remove
(
panelSurface
))
{
;
if
(
p
->
minimizedGeometries
.
remove
(
panelSurface
))
{
emit
p
->
q
->
minimizedGeometriesChanged
();
}
});
...
...
@@ -475,6 +479,9 @@ void PlasmaWindowInterface::Private::unsetMinimizedGeometryCallback(wl_client *c
if
(
!
panelSurface
)
{
return
;
}
if
(
!
p
->
minimizedGeometries
.
contains
(
panelSurface
))
{
return
;
}
p
->
minimizedGeometries
.
remove
(
panelSurface
);
emit
p
->
q
->
minimizedGeometriesChanged
();
}
...
...
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