Bring back extended borders
No longer provided as a region but by dedicated border values to all directions.
This commit is contained in:
parent
796ac23672
commit
0151b224e3
1 changed files with 13 additions and 8 deletions
21
client.cpp
21
client.cpp
|
@ -445,15 +445,19 @@ void Client::updateInputWindow()
|
||||||
|
|
||||||
QRegion region;
|
QRegion region;
|
||||||
|
|
||||||
#if 0
|
if (!noBorder() && m_decoration) {
|
||||||
if (!noBorder()) {
|
const int left = m_decoration->extendedBorderLeft();
|
||||||
// This function is implemented as a slot to avoid breaking binary
|
const int top = m_decoration->extendedBorderTop();
|
||||||
// compatibility
|
const int right = m_decoration->extendedBorderRight();
|
||||||
QMetaObject::invokeMethod(decoration, "region", Qt::DirectConnection,
|
const int bottom = m_decoration->extendedBorderBottom();
|
||||||
Q_RETURN_ARG(QRegion, region),
|
if (left != 0 || top != 0 || right != 0 || bottom != 0) {
|
||||||
Q_ARG(KDecorationDefines::Region, KDecorationDefines::ExtendedBorderRegion));
|
region = QRegion(-left,
|
||||||
|
-top,
|
||||||
|
m_decoration->size().width() + left + right,
|
||||||
|
m_decoration->size().height() + top + bottom);
|
||||||
|
region = region.subtracted(m_decoration->rect());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if (region.isEmpty()) {
|
if (region.isEmpty()) {
|
||||||
m_decoInputExtent.reset();
|
m_decoInputExtent.reset();
|
||||||
|
@ -531,6 +535,7 @@ void Client::createDecoration(const QRect& oldgeom)
|
||||||
performMouseCommand(options->operationTitlebarMouseWheel(angleDelta.y()), Cursor::pos());
|
performMouseCommand(options->operationTitlebarMouseWheel(angleDelta.y()), Cursor::pos());
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
connect(m_decoration, &KDecoration2::Decoration::extendedBordersChanged, this, &Client::updateInputWindow);
|
||||||
}
|
}
|
||||||
|
|
||||||
move(calculateGravitation(false));
|
move(calculateGravitation(false));
|
||||||
|
|
Loading…
Reference in a new issue