paperwm/PaperWM

Window with a fixed size

faebser opened this issue · 4 comments

More a question instead of an issue:

Is there a way to give a window an exact size? I'm working on a project right now where that is a requirement.

To be a bit more specific:
I have an openFrameworks project that has to run in a 1024x768 big window. But when I run it, paperwm automatically resizes it so that it fits in. If I then move it into the scratch layer I have a really hard time hitting the right resolution.

Thanks

Not at the moment, but see #304 for work in progress of having a default size, and #189 (which I think @olejorgenb is still using at work).

Until #189 lands only scratch windows can have a fixed height.

If you create a winprop to redirect the window directly to the scratch layer the intitial size should be preserved.

In user.js@init: (and restart gnome-shell/session)

    Tiling.defwinprop({
        wm_class: "openFrameworks",   // <--- see the winprop documentation for finding this value
        scratch_layer: true
    });

Maybe it would make sense to use the initial size when detaching the window for the first time.

Note: I would try to set https://openframeworks.cc/documentation/application/ofGLFWWindowSettings/#show_resizable to false. Tiled windows respect the resizable flag that gnome-shell expose.

Thank you for all the infos. I added a paragraph about fixed window size to the Readme: #313