Port some of kwin to Workspace::geometry()
This commit is contained in:
parent
71aeb5528a
commit
9dfccfc95c
5 changed files with 10 additions and 10 deletions
|
@ -974,7 +974,7 @@ class InternalWindowEventFilter : public InputEventFilter {
|
|||
if (!w->isVisible()) {
|
||||
continue;
|
||||
}
|
||||
if (!screens()->geometry().contains(w->geometry())) {
|
||||
if (!workspace()->geometry().contains(w->geometry())) {
|
||||
continue;
|
||||
}
|
||||
if (w->property("_q_showWithoutActivating").toBool()) {
|
||||
|
|
|
@ -157,7 +157,7 @@ void PointerInputRedirection::init()
|
|||
connect(workspace(), &Workspace::clientAdded, this, setupMoveResizeConnection);
|
||||
|
||||
// warp the cursor to center of screen
|
||||
warp(screens()->geometry().center());
|
||||
warp(workspace()->geometry().center());
|
||||
updateAfterScreenChange();
|
||||
}
|
||||
|
||||
|
@ -811,7 +811,7 @@ void PointerInputRedirection::updatePosition(const QPointF &pos)
|
|||
// verify that at least one screen contains the pointer position
|
||||
QPointF p = pos;
|
||||
if (!screenContainsPos(p)) {
|
||||
const QRectF unitedScreensGeometry = screens()->geometry();
|
||||
const QRectF unitedScreensGeometry = workspace()->geometry();
|
||||
p = confineToBoundingBox(p, unitedScreensGeometry);
|
||||
if (!screenContainsPos(p)) {
|
||||
const AbstractOutput *currentOutput = kwinApp()->platform()->outputAt(m_pos.toPoint());
|
||||
|
|
|
@ -237,7 +237,7 @@ QSize WorkspaceWrapper::workspaceSize() const
|
|||
|
||||
QSize WorkspaceWrapper::displaySize() const
|
||||
{
|
||||
return screens()->displaySize();
|
||||
return workspace()->geometry().size();
|
||||
}
|
||||
|
||||
int WorkspaceWrapper::displayWidth() const
|
||||
|
@ -368,12 +368,12 @@ int WorkspaceWrapper::activeScreen() const
|
|||
|
||||
QRect WorkspaceWrapper::virtualScreenGeometry() const
|
||||
{
|
||||
return screens()->geometry();
|
||||
return workspace()->geometry();
|
||||
}
|
||||
|
||||
QSize WorkspaceWrapper::virtualScreenSize() const
|
||||
{
|
||||
return screens()->size();
|
||||
return workspace()->geometry().size();
|
||||
}
|
||||
|
||||
void WorkspaceWrapper::sendClientToScreen(AbstractClient *client, int screen)
|
||||
|
|
|
@ -1607,13 +1607,13 @@ void Workspace::switchWindow(Direction direction)
|
|||
auto opposite = [&] {
|
||||
switch(direction) {
|
||||
case DirectionNorth:
|
||||
return QPoint(curPos.x(), screens()->geometry().height());
|
||||
return QPoint(curPos.x(), geometry().height());
|
||||
case DirectionSouth:
|
||||
return QPoint(curPos.x(), 0);
|
||||
case DirectionEast:
|
||||
return QPoint(0, curPos.y());
|
||||
case DirectionWest:
|
||||
return QPoint(screens()->geometry().width(), curPos.y());
|
||||
return QPoint(geometry().width(), curPos.y());
|
||||
default:
|
||||
Q_UNREACHABLE();
|
||||
}
|
||||
|
|
|
@ -4617,7 +4617,7 @@ NETExtendedStrut X11Client::strut() const
|
|||
{
|
||||
NETExtendedStrut ext = info->extendedStrut();
|
||||
NETStrut str = info->strut();
|
||||
const QSize displaySize = screens()->displaySize();
|
||||
const QSize displaySize = workspace()->geometry().size();
|
||||
if (ext.left_width == 0 && ext.right_width == 0 && ext.top_width == 0 && ext.bottom_width == 0
|
||||
&& (str.left != 0 || str.right != 0 || str.top != 0 || str.bottom != 0)) {
|
||||
// build extended from simple
|
||||
|
@ -4648,7 +4648,7 @@ NETExtendedStrut X11Client::strut() const
|
|||
StrutRect X11Client::strutRect(StrutArea area) const
|
||||
{
|
||||
Q_ASSERT(area != StrutAreaAll); // Not valid
|
||||
const QSize displaySize = screens()->displaySize();
|
||||
const QSize displaySize = workspace()->geometry().size();
|
||||
NETExtendedStrut strutArea = strut();
|
||||
switch(area) {
|
||||
case StrutAreaTop:
|
||||
|
|
Loading…
Reference in a new issue