Discussion:
FVWM: Bug with Qt4 window positioning
Christian Ehrlicher
2010-10-24 17:39:09 UTC
Permalink
Hi,

I've a problem with fvwm2 window positioning when using Qt4 in fvwm2. It works
fine with KDE. You can reproduce it with the attached example. You can compile
it with the following steps:

- create a subdir 'example'
- place main.cpp in there
- execute 'qmake -project'
- then 'qmake'
- and then 'make'

When you start the resulting executable without an argument and then with an
argument (doesn't matter what you give as argument) you can see that the
resulting window position differs.
It looks like when the window is moved before it gets shown the windeco isn't
took into account which leads to a displacement in the y-axis.

I'm using the latest official release (2.5.31, also tested with official
2.5.26 package from openSUSE). I can also do some debugging by myself if
someone can point me into the correct direction.


Thx,
Christian Ehrlicher
Dominik Vogt
2010-10-24 18:24:45 UTC
Permalink
Post by Christian Ehrlicher
I've a problem with fvwm2 window positioning when using Qt4 in fvwm2. It works
fine with KDE. You can reproduce it with the attached example. You can compile
- create a subdir 'example'
- place main.cpp in there
- execute 'qmake -project'
- then 'qmake'
- and then 'make'
When you start the resulting executable without an argument and then with an
argument (doesn't matter what you give as argument) you can see that the
resulting window position differs.
It looks like when the window is moved before it gets shown the windeco isn't
took into account which leads to a displacement in the y-axis.
Without going into the details: It's not a bug, it's a feature.
If you don't like that behaviour, use this line in your .fvwm2rc:

style * MoveByProgramMethod UseGravity
Post by Christian Ehrlicher
I'm using the latest official release (2.5.31, also tested with official
2.5.26 package from openSUSE). I can also do some debugging by myself if
someone can point me into the correct direction.
Thx,
Christian Ehrlicher
#include <QApplication>
#include <QLabel>
int main(int argc, char** argv)
{
QApplication app(argc, argv);
QLabel *lbl = new QLabel("Hello FVWM2");
if(app.arguments().count() > 1) {
lbl->setVisible(true);
lbl->move(100,100);
} else {
lbl->move(100,100);
lbl->setVisible(true);
}
return app.exec();
}
Ciao

Dominik ^_^ ^_^
--
Dominik Vogt
Christian Ehrlicher
2010-10-24 18:34:03 UTC
Permalink
Post by Dominik Vogt
Post by Christian Ehrlicher
I've a problem with fvwm2 window positioning when using Qt4 in fvwm2. It works
fine with KDE. You can reproduce it with the attached example. You can compile
- create a subdir 'example'
- place main.cpp in there
- execute 'qmake -project'
- then 'qmake'
- and then 'make'
When you start the resulting executable without an argument and then with an
argument (doesn't matter what you give as argument) you can see that the
resulting window position differs.
It looks like when the window is moved before it gets shown the windeco isn't
took into account which leads to a displacement in the y-axis.
Without going into the details: It's not a bug, it's a feature.
style * MoveByProgramMethod UseGravity
Wow - never thought about such a solution ;)
But I've another bug but I currently can't provide a testcase which is
simple enough for a mailing list. I'll try to explain - maybe you've
also such an easy solution for it (but I doubt).
It's a normal toplevel window which shows information about an entity.
When no entity is selected I hide the window. Then it's later shown when
a another entity is selected. Now I've a problem when I hide the window
twice it doesn't show up afterwards again - no matter what I try.
I did not test it with .31, only with .26 because the solution was
simple - destroy isntead hide the window.

Thx,
Christian
Thomas Adam
2010-10-24 18:37:09 UTC
Permalink
Post by Christian Ehrlicher
Post by Dominik Vogt
Post by Christian Ehrlicher
I've a problem with fvwm2 window positioning when using Qt4 in fvwm2. It works
fine with KDE. You can reproduce it with the attached example. You can compile
- create a subdir 'example'
- place main.cpp in there
- execute 'qmake -project'
- then 'qmake'
- and then 'make'
When you start the resulting executable without an argument and then with an
argument (doesn't matter what you give as argument) you can see that the
resulting window position differs.
It looks like when the window is moved before it gets shown the windeco isn't
took into account which leads to a displacement in the y-axis.
Without going into the details: It's not a bug, it's a feature.
style * MoveByProgramMethod UseGravity
Wow - never thought about such a solution ;)
But I've another bug but I currently can't provide a testcase which
is simple enough for a mailing list. I'll try to explain - maybe
you've also such an easy solution for it (but I doubt).
It's a normal toplevel window which shows information about an
entity. When no entity is selected I hide the window. Then it's
later shown when a another entity is selected. Now I've a problem
when I hide the window twice it doesn't show up afterwards again -
no matter what I try.
I did not test it with .31, only with .26 because the solution was
simple - destroy isntead hide the window.
Yes, I've seen this and have a patch for it already -- it's to do with the
deferred mapping logic in events.c -- can you confirm for me if the window
is always in the WithDrawn state when this happens?

-- Thomas Adam
--
"Deep in my heart I wish I was wrong. But deep in my heart I know I am
not." -- Morrissey ("Girl Least Likely To" -- off of Viva Hate.)
Christian Ehrlicher
2010-10-25 15:22:29 UTC
Permalink
Post by Thomas Adam
Post by Christian Ehrlicher
Post by Dominik Vogt
Post by Christian Ehrlicher
I've a problem with fvwm2 window positioning when using Qt4 in fvwm2. It works
fine with KDE. You can reproduce it with the attached example. You can compile
- create a subdir 'example'
- place main.cpp in there
- execute 'qmake -project'
- then 'qmake'
- and then 'make'
When you start the resulting executable without an argument and then with an
argument (doesn't matter what you give as argument) you can see that the
resulting window position differs.
It looks like when the window is moved before it gets shown the windeco isn't
took into account which leads to a displacement in the y-axis.
Without going into the details: It's not a bug, it's a feature.
style * MoveByProgramMethod UseGravity
Wow - never thought about such a solution ;)
But I've another bug but I currently can't provide a testcase which
is simple enough for a mailing list. I'll try to explain - maybe
you've also such an easy solution for it (but I doubt).
It's a normal toplevel window which shows information about an
entity. When no entity is selected I hide the window. Then it's
later shown when a another entity is selected. Now I've a problem
when I hide the window twice it doesn't show up afterwards again -
no matter what I try.
I did not test it with .31, only with .26 because the solution was
simple - destroy isntead hide the window.
Yes, I've seen this and have a patch for it already -- it's to do with the
deferred mapping logic in events.c -- can you confirm for me if the window
is always in the WithDrawn state when this happens?
Can you give me a short hint how to check for this attribute?

Thx,
Christian
Thomas Adam
2010-11-11 15:50:15 UTC
Permalink
Post by Christian Ehrlicher
Post by Thomas Adam
Post by Christian Ehrlicher
Post by Dominik Vogt
Post by Christian Ehrlicher
I've a problem with fvwm2 window positioning when using Qt4 in fvwm2. It works
fine with KDE. You can reproduce it with the attached example. You can compile
- create a subdir 'example'
- place main.cpp in there
- execute 'qmake -project'
- then 'qmake'
- and then 'make'
When you start the resulting executable without an argument and then with an
argument (doesn't matter what you give as argument) you can see that the
resulting window position differs.
It looks like when the window is moved before it gets shown the windeco isn't
took into account which leads to a displacement in the y-axis.
Without going into the details: It's not a bug, it's a feature.
style * MoveByProgramMethod UseGravity
Wow - never thought about such a solution ;)
But I've another bug but I currently can't provide a testcase which
is simple enough for a mailing list. I'll try to explain - maybe
you've also such an easy solution for it (but I doubt).
It's a normal toplevel window which shows information about an
entity. When no entity is selected I hide the window. Then it's
later shown when a another entity is selected. Now I've a problem
when I hide the window twice it doesn't show up afterwards again -
no matter what I try.
I did not test it with .31, only with .26 because the solution was
simple - destroy isntead hide the window.
Yes, I've seen this and have a patch for it already -- it's to do with the
deferred mapping logic in events.c -- can you confirm for me if the window
is always in the WithDrawn state when this happens?
Can you give me a short hint how to check for this attribute?
Fixed in CVS.

-- Thomas Adam
Thomas Adam
2012-02-11 12:02:05 UTC
Permalink
Post by Christian Ehrlicher
Post by Dominik Vogt
Post by Christian Ehrlicher
I've a problem with fvwm2 window positioning when using Qt4 in fvwm2. It works
fine with KDE. You can reproduce it with the attached example. You can compile
- create a subdir 'example'
- place main.cpp in there
- execute 'qmake -project'
- then 'qmake'
- and then 'make'
When you start the resulting executable without an argument and then with an
argument (doesn't matter what you give as argument) you can see that the
resulting window position differs.
It looks like when the window is moved before it gets shown the windeco isn't
took into account which leads to a displacement in the y-axis.
Without going into the details: It's not a bug, it's a feature.
style * MoveByProgramMethod UseGravity
Wow - never thought about such a solution ;)
But I've another bug but I currently can't provide a testcase which
is simple enough for a mailing list. I'll try to explain - maybe
you've also such an easy solution for it (but I doubt).
It's a normal toplevel window which shows information about an
entity. When no entity is selected I hide the window. Then it's
later shown when a another entity is selected. Now I've a problem
when I hide the window twice it doesn't show up afterwards again -
no matter what I try.
Based on your original main.cpp file in this thread, can you provide code
which still exhibits this?

-- Thomas Adam
--
"Deep in my heart I wish I was wrong. But deep in my heart I know I am
not." -- Morrissey ("Girl Least Likely To" -- off of Viva Hate.)
Thomas Adam
2010-10-24 18:27:59 UTC
Permalink
Post by Christian Ehrlicher
Hi,
I've a problem with fvwm2 window positioning when using Qt4 in fvwm2. It works
fine with KDE. You can reproduce it with the attached example. You can compile
- create a subdir 'example'
- place main.cpp in there
- execute 'qmake -project'
- then 'qmake'
- and then 'make'
It's not a bug -- see:

MoveByProgramMethod UseGravity
Post by Christian Ehrlicher
When you start the resulting executable without an argument and then with an
argument (doesn't matter what you give as argument) you can see that the
resulting window position differs.
It looks like when the window is moved before it gets shown the windeco isn't
took into account which leads to a displacement in the y-axis.
I'm using the latest official release (2.5.31, also tested with official
2.5.26 package from openSUSE). I can also do some debugging by myself if
someone can point me into the correct direction.
Thx,
Christian Ehrlicher
#include <QApplication>
#include <QLabel>
int main(int argc, char** argv)
{
QApplication app(argc, argv);
QLabel *lbl = new QLabel("Hello FVWM2");
if(app.arguments().count() > 1) {
lbl->setVisible(true);
lbl->move(100,100);
} else {
lbl->move(100,100);
lbl->setVisible(true);
}
return app.exec();
}
-- Thomas Adam
--
"Deep in my heart I wish I was wrong. But deep in my heart I know I am
not." -- Morrissey ("Girl Least Likely To" -- off of Viva Hate.)
Loading...