summaryrefslogtreecommitdiff
path: root/src/twm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/twm.c')
-rw-r--r--src/twm.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/twm.c b/src/twm.c
index ce67806..405a57e 100644
--- a/src/twm.c
+++ b/src/twm.c
@@ -183,12 +183,12 @@ static char *atom_names[11] = {
/* |hasExtension()| and |IsPrintScreen()| have been stolen from
* xc/programs/xdpyinfo/xdpyinfo.c */
static Bool
-hasExtension(Display *dpy, char *extname)
+hasExtension(Display *dpy2, char *extname)
{
int num_extensions, i;
char **extensions;
- extensions = XListExtensions(dpy, &num_extensions);
+ extensions = XListExtensions(dpy2, &num_extensions);
for (i = 0; i < num_extensions &&
(strcmp(extensions[i], extname) != 0); i++);
XFreeExtensionList(extensions);
@@ -198,15 +198,15 @@ hasExtension(Display *dpy, char *extname)
static Bool
IsPrintScreen(Screen *s)
{
- Display *dpy = XDisplayOfScreen(s);
- int i;
+ Display *dpy2 = XDisplayOfScreen(s);
/* Check whether this is a screen of a print DDX */
- if (hasExtension(dpy, XP_PRINTNAME)) {
+ if (hasExtension(dpy2, XP_PRINTNAME)) {
Screen **pscreens;
int pscrcount;
+ int i;
- pscreens = XpQueryScreens(dpy, &pscrcount);
+ pscreens = XpQueryScreens(dpy2, &pscrcount);
for (i = 0; (i < pscrcount) && pscreens; i++) {
if (s == pscreens[i]) {
return True;
@@ -889,11 +889,12 @@ void
RestoreWithdrawnLocation(TwmWindow *tmp)
{
int gravx, gravy;
- unsigned int bw, mask;
+ unsigned int bw;
XWindowChanges xwc;
if (XGetGeometry(dpy, tmp->w, &JunkRoot, &xwc.x, &xwc.y,
&JunkWidth, &JunkHeight, &bw, &JunkDepth)) {
+ unsigned mask;
GetGravityOffsets(tmp, &gravx, &gravy);
if (gravy < 0)