On Sun, 24 Nov 2013 10:20:46 +0000 "Carlos R. Mafra" <[email protected]> wrote:
> On Sat, 23 Nov 2013 at 22:22:18 +0100, Amadeusz Sławiński wrote: > > Reported-by: Carlos R. Mafra <[email protected]> > > Signed-off-by: Amadeusz Sławiński <[email protected]> > > --- > > src/placement.c | 21 +++++++++++++++++++++ > > 1 file changed, 21 insertions(+) > > > > diff --git a/src/placement.c b/src/placement.c > > index f48ee3c..7587b87 100644 > > --- a/src/placement.c > > +++ b/src/placement.c > > @@ -507,6 +507,27 @@ void PlaceWindow(WWindow *wwin, int *x_ret, > > int *y_ret, unsigned width, unsigned WArea usableArea = > > wGetUsableAreaForHead(scr, wGetHeadForPointerLocation(scr), NULL, > > True); > > + /* check if user wants dock covered */ > > + if (scr->dock && (!scr->dock->lowered || > > wPreferences.no_window_over_dock)) { > > + int offset = wPreferences.icon_size + > > DOCK_EXTRA_SPACE; + > > + if (scr->dock->on_right_side) > > + usableArea.x2 -= offset; > > + else > > + usableArea.x1 += offset; > > + } > > + > > + /* check if icons are on the same side as dock, and adjust > > if not done already */ > > + if (scr->dock && wPreferences.no_window_over_icons > > && !wPreferences.no_window_over_dock && (wPreferences.icon_yard & > > IY_VERT)) { > > + int offset = wPreferences.icon_size + > > DOCK_EXTRA_SPACE; + > > + if (scr->dock->on_right_side && > > (wPreferences.icon_yard & IY_RIGHT)) > > + usableArea.x2 -= offset; > > + /* can't use IY_LEFT in if, it's 0 ... */ > > + if (!scr->dock->on_right_side > > && !(wPreferences.icon_yard & IY_RIGHT)) > > + usableArea.x1 += offset; > > + } > > + > > switch (wPreferences.window_placement) { > > case WPM_MANUAL: > > InteractivePlaceWindow(wwin, x_ret, y_ret, width, > > height); -- > > This patch fixes it, thanks. > > But could you explain the reason? In your series you added these > blocks of code in other parts too, and I'd like to understand > why this multiplication is justified. > > In any case, thanks a lot! > > Thanks for confirming that it works, I've taken another look and send a patch which explains it, and moves code into shared function. -- To unsubscribe, send mail to [email protected].
