limiting window maximal size (for very large virtual screen)
Hello
I have on my home desktop (Debian/Sid/x86-64) physically two large screens. See the photo here. The hwinfo
output is here and the output of xdpyinfo
gives notably
screen #0: dimensions: 5360x1440 pixels (1418x381 millimeters) resolution: 96x96 dots per inch
xfwm4 --version
gives
This is xfwm4 version 4.14.2 (revision bb38fd909) for Xfce 4.14
Released under the terms of the GNU General Public License.
Compiled against GTK+-3.24.18, using GTK+-3.24.20.
Build configuration and supported features:
- Startup notification support: Yes
- XSync support: Yes
- Render support: Yes
- Xrandr support: Yes
- Xpresent support: Yes
- Embedded compositor: Yes
- Epoxy support: Yes
- KDE systray proxy (deprecated): No
I would like to forcibly limit every X11 top window geometry to at most 3000 pixels wide and 1400 pixels high. A single top window which is 5000 pixels wide is just visually annoying.
I am capable of compiling xfwm4 from source code and I am willing to patch the source C code (and I am aware of both EWMH and ICCCM). In the previous century I did wrote some proprietary Xlib client application, and some skills remain for a long time.
What C files should I patch to add the ability to limit top level windows to some hard set limit of 3000 pixels wide and 1400 pixels high (and make it configurable thru some textual files)?
My guess is file src/moveresize.c
, but I don't understand the role of fields ow
, oh
in struct _MoveResizeData
there.
FWIW, adding
if (passdata->ow > 3000)
passdata->ow = 3000;
if (passdata->oh > 1400)
passdata->oh = 1400;
at end of function clientSetHandle
does not work.
Regards.
Basile Starynkevitch, near Paris, France
http://starynkevitch.net/Basile/
<basile@starynkevitch.net>