Discussion:
FVWM: fltk window origin and fvwm
s***@arcor.de
2014-07-06 18:27:29 UTC
Permalink
Hello, Dominik,

did you find anything I made wrong?

winfried
Dominik Vogt
2014-07-07 18:36:06 UTC
Permalink
Post by s***@arcor.de
did you find anything I made wrong?
Other than the hints I already sent you (and to the list)? No. I've
never used fltk, so I'm the wron person to ask.

Ciao

Dominik ^_^ ^_^
--
Dominik Vogt
s***@arcor.de
2014-07-07 22:48:34 UTC
Permalink
Post by Dominik Vogt
Other than the hints I already sent you (and to the list)? No. I've
never used fltk, so I'm the wron person to ask.
Wrong answer.

In the meantime I have tested

* xfce4 : OK
* enlightenment : OK
* ede : OK
* uwm : OK

They all fix the origin of the main window. No jumping around.
Only FVWM cannot fix the main window: a window of X11.

winfried
Dominik Vogt
2014-07-07 21:05:09 UTC
Permalink
Post by s***@arcor.de
Post by Dominik Vogt
Other than the hints I already sent you (and to the list)? No. I've
never used fltk, so I'm the wron person to ask.
Wrong answer.
...
Only FVWM cannot fix the main window: a window of X11.
It's your application, and I've already given you advice how to
fix it in a way that every window manager handles properly: Use
NorthWestGravity, not StaticGravity. I'm not going to break other
applications by changing fvwm to what you think is right.

Ciao

Dominik ^_^ ^_^
--
Dominik Vogt
s***@arcor.de
2014-07-09 11:18:23 UTC
Permalink
Post by Dominik Vogt
It's your application, and I've already given you advice how to
fix it in a way that every window manager handles properly: Use
NorthWestGravity, not StaticGravity. I'm not going to break
other applications by changing fvwm to what you think is right.
The matter is not what I think is right. The matter is
HOW to 'Use NorthWestGravity, not StaticGravity' in the
configuration file fvwm2rc.

Looking around I have found that 'xwininfo' might be informative. For the window in question I get:
(...)
Bit Gravity State: ForgetGravity
Window Gravity State: StaticGravity
(...)

Searching in FLTK-1.3 I found that in fact the values

attr.bit_gravity = 0; // StaticGravity; 7:NorthWestGravity
hints->win_gravity = StaticGravity; // NorthWestGravity

are used. After replacing bit_gravity with 7 and win_gravity
with NorthWestGravity, the window in question showed up as
wanted.

HOW must run the line(s) in fvwm2rc to change these values?

winfried
Dominik Vogt
2014-07-09 12:22:20 UTC
Permalink
Post by s***@arcor.de
Post by Dominik Vogt
I'm not going to break
other applications by changing fvwm to what you think is right.
The matter is not what I think is right. The matter is
HOW to 'Use NorthWestGravity, not StaticGravity' in the
configuration file fvwm2rc.
The gravity is set by the application, not by the window manager.
So, if fltk does not use NorthWestGravity, then change fltk or use
something else.
Post by s***@arcor.de
Searching in FLTK-1.3 I found that in fact the values
attr.bit_gravity = 0; // StaticGravity; 7:NorthWestGravity
hints->win_gravity = StaticGravity; // NorthWestGravity
are used. After replacing bit_gravity with 7 and win_gravity
with NorthWestGravity, the window in question showed up as
wanted.
If fltk-1.3 relies on poorly defined behaviour, then that's fltk's
problem, not fvwm's. The only way to fix that is to change fltk.
There's no possible sensible reason to use StaticGravity on all
windows, and in many cases it's really just broken. If an
applications wants to keep the top left corner of the window at the
same position when it's resized, just use NorthWestGravity. That's
what NorthWestGravity is meant for.

The meaning of StaticGravity is only properly defined if just the
decorations of a window change, but the contents stay the same
(and are not resized).

Practically, when a window with StaticGravity is in fvwmresized, it
keeps the center of the client window at the same place. Other window
managers keep the top left corner of the client window in place,
which is equivalent to NorthWestGravity unless the decorations of
the window change. StaticGravity should really never be used
unless you have a really good reason to care about the size and
placement of the window decorations, and even then it's probably
just a bug in the application.

StaticGravity during resize is not really standardized anyway.
Post by s***@arcor.de
HOW must run the line(s) in fvwm2rc to change these values?
Fvwm (or any other window manager) cannot override the application
window's gravity.

Ciao

Dominik ^_^ ^_^

Loading...