how to confine windows to working area

I’m using xfce4-panel in combination with EWMHBaseStruts with ‘PositionPlacement UnderMouse’ on fvwm 2.6.5 currently and I’m trying to determine if there’s a way to a) keep windows from moving partially off screen / out of the working area when moved programmatically or interactively and b) have new windows be forced to open within those same boundaries. Anyone have any ideas?

I don’t think there is a way to prevent windows from being moved out of the EWMHBaseStruts area. This is used when placing windows (with most placement policies) and maximization of windows.

I think with window snapping, you can have windows snap to the panel which will make it harder to move outside of the working area, look at the various snap styles. This way when doing a mouse move, it will snap to the panel, and require more mouse movement to move it off the screen. I don’t think you can stop this from happening but you can make it not happen as easily when the window hits the panel.

As for b), how are you placing the new windows, most placement policies should honor EWMHBaseStruts when placing windows.


Looking at it and thinking about it some more, in regards to b), I think it’s intermittent with certain applications that want to be ‘smart’, so that’s just going to be an issue in any regard.

Thanks for the information about a).