summaryrefslogtreecommitdiff
path: root/src/events.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/events.c')
-rw-r--r--src/events.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/events.c b/src/events.c
index 9d82b81..54f5bff 100644
--- a/src/events.c
+++ b/src/events.c
@@ -735,6 +735,7 @@ HandlePropertyNotify(void)
char *name = NULL;
XSetWindowAttributes attributes; /* attributes for create windows */
Pixmap pm;
+ Window wdummy = None;
/* watch for standard colormap changes */
if (Event.xproperty.window == Scr->Root) {
@@ -821,7 +822,7 @@ HandlePropertyNotify(void)
// to a default icon */
int icon_x = 0, icon_y = 0;
- XGetGeometry(dpy, Tmp_win->icon_w, &JunkRoot,
+ XGetGeometry(dpy, Tmp_win->icon_w, &wdummy,
&icon_x, &icon_y,
&JunkWidth, &JunkHeight, &JunkBW, &JunkDepth);
XSelectInput(dpy, Tmp_win->icon_w, None);
@@ -841,7 +842,7 @@ HandlePropertyNotify(void)
* Try to find out where it is; if we succeed, move the new
* window to where the old one is.
*/
- if (XGetGeometry(dpy, Tmp_win->icon_w, &JunkRoot, &icon_x,
+ if (XGetGeometry(dpy, Tmp_win->icon_w, &wdummy, &icon_x,
&icon_y, &JunkWidth, &JunkHeight, &JunkBW,
&JunkDepth)) {
/*
@@ -899,7 +900,7 @@ HandlePropertyNotify(void)
(Tmp_win->wmhints->flags & IconPixmapHint)) {
unsigned long valuemask; /* mask for create windows */
- if (!XGetGeometry(dpy, Tmp_win->wmhints->icon_pixmap, &JunkRoot,
+ if (!XGetGeometry(dpy, Tmp_win->wmhints->icon_pixmap, &wdummy,
&JunkX, &JunkY,
(unsigned int *) &Tmp_win->icon_width,
(unsigned int *) &Tmp_win->icon_height, &JunkBW,
@@ -1016,12 +1017,14 @@ RedoIconName(void)
void
HandleClientMessage(void)
{
+ Window wdummy = None;
+
if (Event.xclient.message_type == _XA_WM_CHANGE_STATE) {
if (Tmp_win != NULL) {
if (Event.xclient.data.l[0] == IconicState && !Tmp_win->icon) {
XEvent button;
- XQueryPointer(dpy, Scr->Root, &JunkRoot, &JunkChild,
+ XQueryPointer(dpy, Scr->Root, &wdummy, &wdummy,
&(button.xmotion.x_root),
&(button.xmotion.y_root),
&JunkX, &JunkY, &JunkMask);
@@ -1466,10 +1469,11 @@ void
HandleMotionNotify(void)
{
XPointer context_data;
+ Window wdummy = None;
if (ResizeWindow != (Window) 0) {
XQueryPointer(dpy, Event.xany.window,
- &(Event.xmotion.root), &JunkChild,
+ &(Event.xmotion.root), &wdummy,
&(Event.xmotion.x_root), &(Event.xmotion.y_root),
&(Event.xmotion.x), &(Event.xmotion.y), &JunkMask);
@@ -1697,6 +1701,7 @@ HandleButtonPress(void)
{
unsigned int modifier;
Cursor cur;
+ Window wdummy = None;
/* too much code relies on this assumption */
if (Event.xbutton.button > MAX_BUTTONS)
@@ -1789,7 +1794,7 @@ HandleButtonPress(void)
XTranslateCoordinates(dpy, Event.xany.window, Tmp_win->w,
Event.xbutton.x, Event.xbutton.y,
- &x, &y, &JunkChild);
+ &x, &y, &wdummy);
Event.xbutton.x = x;
Event.xbutton.y = y - Tmp_win->title_height;
@@ -1869,7 +1874,7 @@ HandleButtonPress(void)
XTranslateCoordinates(dpy, Scr->Root, Event.xany.window,
Event.xbutton.x,
- Event.xbutton.y, &x, &y, &JunkChild);
+ Event.xbutton.y, &x, &y, &wdummy);
Event.xbutton.x = x;
Event.xbutton.y = y;