On Sun, Sep 14, 2014 at 02:33:21PM +0100, Dominik Vogt wrote: > On Sun, Sep 14, 2014 at 01:18:30PM +0100, Dominik Vogt wrote: > > Hrm, I understand, but I'm not comfortable with that. What if the > > new size hints make the current geometry of the window invalid, > > e.g. by setting a may size that is smaller than the window size, > > or by changing the resize unit? Then the next time the user > > grabbed the window's title to drag it aroud it would suddenly > > change its size. > > > > While the discussed use (forbidding resize) seems to be safe, this > > fix should be extended so that if the new hints would not allow > > the window's current geometry, they are ignored. > > > > I'll take a look. > > I've committed a fix. It now ignores new hints in > HandlePropertyNotify() if they would make either the current > geometry or the normal geometry (if the window is maximized) > invalid. The new hints are then applied when a ConfigureRequest > comes in. Does anybody have a test case for this? This needs to > be tested with > > * normal windows > * maximized windows -> always rejected unless the maximized size > is the same as the normal size > * shaded windows -> like normal windows > * shaded maximized windows -> like maximized windows > > I'm not sure I got all cases right.
Tested and fixed now. But please note that setting the min and max window size hints to forbid resizing is *wrong*. You should rather set the width_inc and height_inc to 0. Ciao Dominik ^_^ ^_^ -- Dominik Vogt
