[kwin] Make KWin place the OSD
REVIEW: 115334
This commit is contained in:
parent
3ea8f0c217
commit
404fc2144c
2 changed files with 11 additions and 0 deletions
|
@ -70,6 +70,8 @@ void Placement::place(Client* c, QRect& area)
|
||||||
placeDialog(c, area, options->placement());
|
placeDialog(c, area, options->placement());
|
||||||
else if (c->isSplash())
|
else if (c->isSplash())
|
||||||
placeOnMainWindow(c, area); // on mainwindow, if any, otherwise centered
|
placeOnMainWindow(c, area); // on mainwindow, if any, otherwise centered
|
||||||
|
else if (c->isNotification())
|
||||||
|
placeNotification(c, area);
|
||||||
else
|
else
|
||||||
place(c, area, options->placement());
|
place(c, area, options->placement());
|
||||||
}
|
}
|
||||||
|
@ -481,6 +483,14 @@ void Placement::placeUtility(Client* c, QRect& area, Policy /*next*/)
|
||||||
place(c, area, Default);
|
place(c, area, Default);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Placement::placeNotification(Client* c, QRect& area)
|
||||||
|
{
|
||||||
|
// place at lower 1/3 of the screen
|
||||||
|
const int x = area.left() + (area.width() - c->width()) / 2;
|
||||||
|
const int y = area.top() + 2 * (area.height() - c->height()) / 3;
|
||||||
|
|
||||||
|
c->move(QPoint(x, y));
|
||||||
|
}
|
||||||
|
|
||||||
void Placement::placeDialog(Client* c, QRect& area, Policy nextPlacement)
|
void Placement::placeDialog(Client* c, QRect& area, Policy nextPlacement)
|
||||||
{
|
{
|
||||||
|
|
|
@ -71,6 +71,7 @@ public:
|
||||||
void placeZeroCornered(Client* c, const QRect& area, Policy next = Unknown);
|
void placeZeroCornered(Client* c, const QRect& area, Policy next = Unknown);
|
||||||
void placeDialog(Client* c, QRect& area, Policy next = Unknown);
|
void placeDialog(Client* c, QRect& area, Policy next = Unknown);
|
||||||
void placeUtility(Client* c, QRect& area, Policy next = Unknown);
|
void placeUtility(Client* c, QRect& area, Policy next = Unknown);
|
||||||
|
void placeNotification(Client* c, QRect& area);
|
||||||
|
|
||||||
void reinitCascading(int desktop);
|
void reinitCascading(int desktop);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue