On Wed, 1 Mar 2017 at 21:20:44 -0700, Cyrus Rahman wrote: > While I love the new maximizing functions, in the process of > developing them the code to keep icons from under the dock was lost. > > I have created a patch to prevent this problem. > > I realize it's not in the preferred patch format but I have not yet > had a chance to get this machine fully functional. I hope an attached > context diff will be satisfactory as the patch is small. I've also > included it inline for inspection.
Thank you, Cyrus. Indeed the patch was not in the preferred format, so that's why it took me a bit longer to apply. In any case, thank you very much for your contribution! > > Cyrus > > --- src/placement.c.orig 2017-02-28 15:11:19.717093000 -0700 > +++ src/placement.c 2017-02-28 15:16:39.006177000 -0700 > @@ -117,6 +117,16 @@ void PlaceIcon(WScreen *scr, int *x_ret, > WMBagIterator iter; > WArea area = wGetUsableAreaForHead(scr, head, NULL, False); > > + /* Do not place icons under the dock. */ > + if (scr->dock) { > + int offset = wPreferences.icon_size + DOCK_EXTRA_SPACE; > + > + if (scr->dock->on_right_side) > + area.x2 -= offset; > + else > + area.x1 += offset; > + } > + > /* Find out screen boundaries. */ > > /* Allows each head to have miniwindows */ > --- src/placement.c.orig 2017-02-28 15:11:19.717093000 -0700 > +++ src/placement.c 2017-02-28 15:16:39.006177000 -0700 > @@ -117,6 +117,16 @@ void PlaceIcon(WScreen *scr, int *x_ret, > WMBagIterator iter; > WArea area = wGetUsableAreaForHead(scr, head, NULL, False); > > + /* Do not place icons under the dock. */ > + if (scr->dock) { > + int offset = wPreferences.icon_size + DOCK_EXTRA_SPACE; > + > + if (scr->dock->on_right_side) > + area.x2 -= offset; > + else > + area.x1 += offset; > + } > + > /* Find out screen boundaries. */ > > /* Allows each head to have miniwindows */ -- To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.