[Pkg-wmaker-commits] [wmppp.app] 106/120: wmgeneral: Add support for X geometry strings to -geometry option.

Doug Torrance dtorrance-guest at moszumanska.debian.org
Thu Aug 27 12:04:41 UTC 2015


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch master
in repository wmppp.app.

commit cf70c030ddf892a3093acfa369a149dd95e95f01
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date:   Wed May 27 17:33:23 2015 -0500

    wmgeneral: Add support for X geometry strings to -geometry option.
    
    In particular, we can specify the offsets from the right and bottom of the
    screen using '-', e.g., '-geometry -64-64' places the dockapp in the lower
    right corner of the screen.
---
 wmgeneral/wmgeneral.c | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/wmgeneral/wmgeneral.c b/wmgeneral/wmgeneral.c
index 91635ac..f707e7f 100644
--- a/wmgeneral/wmgeneral.c
+++ b/wmgeneral/wmgeneral.c
@@ -81,7 +81,6 @@ int			d_depth;
 XSizeHints	mysizehints;
 XWMHints	mywmhints;
 Pixel		back_pix, fore_pix;
-char		*Geometry = "";
 Window		iconwin, win;
 GC			NormalGC;
 XpmIcon		wmgen;
@@ -406,7 +405,7 @@ void openXwindow(int argc, char *argv[], char *pixmap_bytes[], char *pixmask_bit
 	char			*geometry = NULL;
 
 	int				dummy=0;
-	int				i, wx, wy;
+	int				i;
 
 	for (i=1; argv[i]; i++) {
 		if (!strcmp(argv[i], "-display"))
@@ -436,11 +435,8 @@ void openXwindow(int argc, char *argv[], char *pixmap_bytes[], char *pixmask_bit
 	back_pix = GetColor("white");
 	fore_pix = GetColor("black");
 
-	XWMGeometry(display, screen, Geometry, NULL, borderwidth, &mysizehints,
+	XWMGeometry(display, screen, geometry, NULL, borderwidth, &mysizehints,
 				&mysizehints.x, &mysizehints.y,&mysizehints.width,&mysizehints.height, &dummy);
-	if (geometry)
-		XParseGeometry(geometry, &mysizehints.x, &mysizehints.y,
-		               (unsigned int *) &mysizehints.width, (unsigned int *) &mysizehints.height);
 
 	mysizehints.width = 64;
 	mysizehints.height = 64;
@@ -495,12 +491,4 @@ void openXwindow(int argc, char *argv[], char *pixmap_bytes[], char *pixmask_bit
 
 	XSetCommand(display, win, argv, argc);
 	XMapWindow(display, win);
-
-	if (geometry) {
-		if (sscanf(geometry, "+%10d+%10d", &wx, &wy) != 2) {
-			fprintf(stderr, "Bad geometry string.\n");
-			exit(1);
-		}
-		XMoveWindow(display, win, wx, wy);
-	}
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmppp.app.git



More information about the Pkg-wmaker-commits mailing list