Add --region option (#2013)

* Fix empty help message bug

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Add --region option

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Fix: initial selection even without --region

* Enable 'full --region'

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Enable 'screen --region'

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Allow negative width/height

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Fix screen intersection bug

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Change output format of --print-geometry

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
This commit is contained in:
Haris Gušić
2021-11-08 22:59:46 +01:00
committed by GitHub
parent df5d99321a
commit 6432490c31
11 changed files with 257 additions and 104 deletions

View File

@@ -85,8 +85,9 @@ void DBusUtils::selectionTaken(uint id, QByteArray rawImage, QRect selection)
file.open(stdout, QIODevice::WriteOnly);
QTextStream out(&file);
out << selection.width() << " " << selection.height() << " "
<< selection.x() << " " << selection.y() << "\n";
// TODO also make this change in D-Bus refactor branch
out << selection.width() << "x" << selection.height() << "+"
<< selection.x() << "+" << selection.y() << "\n";
file.close();
qApp->exit();
}