forked from quickshell/quickshell
core/screen: expose x and y positions
This commit is contained in:
parent
439788fce0
commit
83afce7f68
2 changed files with 22 additions and 0 deletions
|
@ -42,6 +42,24 @@ QString QuickshellScreenInfo::name() const {
|
|||
return this->screen->name();
|
||||
}
|
||||
|
||||
qint32 QuickshellScreenInfo::x() const {
|
||||
if (this->screen == nullptr) {
|
||||
this->warnDangling();
|
||||
return 0;
|
||||
}
|
||||
|
||||
return this->screen->geometry().x();
|
||||
}
|
||||
|
||||
qint32 QuickshellScreenInfo::y() const {
|
||||
if (this->screen == nullptr) {
|
||||
this->warnDangling();
|
||||
return 0;
|
||||
}
|
||||
|
||||
return this->screen->geometry().y();
|
||||
}
|
||||
|
||||
qint32 QuickshellScreenInfo::width() const {
|
||||
if (this->screen == nullptr) {
|
||||
this->warnDangling();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue