mirror of
https://github.com/quickshell-mirror/quickshell.git
synced 2026-11-06 03:56:32 +00:00
core/screen: expose x and y positions
This commit is contained in:
2 files changed
+22
No files matched your search
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user