summaryrefslogtreecommitdiff
path: root/app/xtsscale
diff options
context:
space:
mode:
authorJasper Lievisse Adriaanse <jasper@cvs.openbsd.org>2010-12-06 06:49:48 +0000
committerJasper Lievisse Adriaanse <jasper@cvs.openbsd.org>2010-12-06 06:49:48 +0000
commit74a67f6970643ff4362658208c8afe9201725d4b (patch)
tree8c8f1f4a0436ea7c197aa518296a910983162983 /app/xtsscale
parent29ad0c3f1e11db21f315b8176dc5c7a845a2356a (diff)
- add a flag to specify the display to start xtsscale on.
ok matthieu@
Diffstat (limited to 'app/xtsscale')
-rw-r--r--app/xtsscale/xtsscale.17
-rw-r--r--app/xtsscale/xtsscale.c9
2 files changed, 11 insertions, 5 deletions
diff --git a/app/xtsscale/xtsscale.1 b/app/xtsscale/xtsscale.1
index c61c8e838..349877648 100644
--- a/app/xtsscale/xtsscale.1
+++ b/app/xtsscale/xtsscale.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: xtsscale.1,v 1.10 2010/09/14 06:20:55 jasper Exp $
+.\" $OpenBSD: xtsscale.1,v 1.11 2010/12/06 06:49:47 jasper Exp $
.\"
.\" Copyright (c) 2007 Robert Nagy <robert@openbsd.org>
.\" Copyright (c) 2009 Matthieu Herrb <matthieu@herrb.eu>
@@ -24,7 +24,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: September 14 2010 $
+.Dd $Mdocdate: December 6 2010 $
.Dt XTSSCALE 1
.Os
.Sh NAME
@@ -33,6 +33,7 @@
.Sh SYNOPSIS
.Nm xtsscale
.Bk -words
+.Op Fl D Ar display
.Op Fl d Ar device
.Op Fl o Ar output
.Op Fl v
@@ -44,6 +45,8 @@ will make the pointer act at the indicated location on the screen.
.Pp
The following options can be used:
.Bl -tag -width Ds
+.It Fl D Ar display
+specify the X11 display to use.
.It Fl d Ar device
defines the name or numerical identifier of the X Input extension device
to calibrate.
diff --git a/app/xtsscale/xtsscale.c b/app/xtsscale/xtsscale.c
index fcc441420..e06c14a9f 100644
--- a/app/xtsscale/xtsscale.c
+++ b/app/xtsscale/xtsscale.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xtsscale.c,v 1.15 2010/03/23 20:27:42 matthieu Exp $ */
+/* $OpenBSD: xtsscale.c,v 1.16 2010/12/06 06:49:47 jasper Exp $ */
/*
* Copyright (c) 2007 Robert Nagy <robert@openbsd.org>
* Copyright (c) 2009 Matthieu Herrb <matthieu@herrb.eu>
@@ -524,7 +524,7 @@ get_xrandr_config(Display *dpy, Window root, char *name,
void __dead
usage(void)
{
- fprintf(stderr, "usage: xtsscale [-d device][-o output]\n");
+ fprintf(stderr, "usage: xtsscale [-D display][-d device][-o output]\n");
exit(2);
}
@@ -549,8 +549,11 @@ main(int argc, char *argv[], char *env[])
int cpx[] = { 0, 0, 1, 1, 1 };
int cpy[] = { 0, 1, 0, 0, 1 };
- while ((ch = getopt(argc, argv, "d:o:v")) != -1) {
+ while ((ch = getopt(argc, argv, "D:d:o:v")) != -1) {
switch (ch) {
+ case 'D':
+ display_name = optarg;
+ break;
case 'd':
device_name = optarg;
break;