diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/events.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/events.c b/src/events.c index a8c8fec..9d82b81 100644 --- a/src/events.c +++ b/src/events.c @@ -1782,13 +1782,17 @@ HandleButtonPress(void) if (Tmp_win->list && RootFunction != 0 && (Event.xany.window == Tmp_win->list->w || Event.xany.window == Tmp_win->list->icon)) { + int x = 0; + int y = 0; + Tmp_win = Tmp_win->list->iconmgr->twm_win; + XTranslateCoordinates(dpy, Event.xany.window, Tmp_win->w, Event.xbutton.x, Event.xbutton.y, - &JunkX, &JunkY, &JunkChild); + &x, &y, &JunkChild); - Event.xbutton.x = JunkX; - Event.xbutton.y = JunkY - Tmp_win->title_height; + Event.xbutton.x = x; + Event.xbutton.y = y - Tmp_win->title_height; Event.xany.window = Tmp_win->w; Context = C_WINDOW; @@ -1844,6 +1848,8 @@ HandleButtonPress(void) * inside of a client that was getting button press events. */ XPointer context_data; + int x = 0; + int y = 0; XTranslateCoordinates(dpy, Scr->Root, Scr->Root, Event.xbutton.x, @@ -1863,10 +1869,10 @@ HandleButtonPress(void) XTranslateCoordinates(dpy, Scr->Root, Event.xany.window, Event.xbutton.x, - Event.xbutton.y, &JunkX, &JunkY, &JunkChild); + Event.xbutton.y, &x, &y, &JunkChild); - Event.xbutton.x = JunkX; - Event.xbutton.y = JunkY; + Event.xbutton.x = x; + Event.xbutton.y = y; Context = C_WINDOW; } |