You are not logged in.

#1 2019-06-21 18:09:09

oinkl
Member
Registered: 2010-01-13
Posts: 47

Resize window without resizing application

Is there any tool or window manager that will allow me to resize an X11 window without resizing the content within the window?

In other words, when I drag a window handle, the application is not aware that the window is being resized.
If the desktop frame is larger than the application window size, possibly black bars will be rendered.
If the desktop frame is smaller than the application window size, part of the application will be occluded.

Offline

#2 2019-06-21 18:19:11

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: Resize window without resizing application

Strictly speaking, no.  If you resize the client window, the client is informed and (generally) redraws it's content for the new window size.  However, in most window managers (i.e., reparenting window managers) you don't actually resize the client window directly.  You resize a WM-provided container, and the WM in turn either resizes the client window and/or sends a request to the client to do so.  It'd be easy to modify the code of a window manager to not resize the client, but I don't think there are any WMs that have that as a default behavior.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2019-06-21 18:35:45

oinkl
Member
Registered: 2010-01-13
Posts: 47

Re: Resize window without resizing application

I'm using Openbox, I'll take a look at the source code and see if it's easily modifiable.

Thanks for pointing me in the right direction.

Last edited by oinkl (2019-06-21 18:35:56)

Offline

#4 2019-06-21 19:59:04

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: Resize window without resizing application

Heh, you may have a hard time with openbox.  It's very configurable within it's configs, but modifying the code is trickier than many simple WMs as there are *many* levels of abstraction specific to OB that you'd need to get comfortable with.  It may be particularly hard as OB actually has the parent window it provides set up to respond to changes in the child/client window's resizing.

I'm pretty sure you'd need to make changes in client_configure starting on line 3169 of client.c, but what exactly would have to be done is not so simple.

Getting the *inverse* results where the client window could be resized without the container ever changing size would actually be much easier: I suspect commenting out lines 3205 and 3300 (and their subsequent continuations) would suffice for this behavior.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB