Dialog positioning in GNOME
I seem have come across a problem that exists only in GNOME. The position of a dialog (obtained using pos() ) is incorrect, if and only if the dialog hasn't been moved from its starting position.
I have a included a small test program (Qt4) demonstrating this. At exit, it saves the position of the dialog to a text file ("test.txt"), which it reads upon starting again.
With KDE and XFce (the only other window managers I have), the dialog is placed in the correct position i.e. the position at last exit. But with GNOME, the dialog is placed in the correct position only if it was moved by the user from where it was created, otherwise it is placed at the top left hand corner of the screen.
I have search Qt forums and the Trolltech Task Tracker without finding any reference to this. Has anyone heard of such a possible bug before?
Code:
#include <QtGui>
int main(int argc, char *argv[])
{
QLabel *label
= new QLabel("Testing widget->pos()", dialog
);
layout->addWidget(label);
// get position
{
dialog->move(str.split(":")[0].toInt(), str.split(":")[1].toInt());
file.close();
}
dialog->show();
app.exec();
// write position
{
.arg(dialog->pos().y());
file.write(str.toLocal8Bit());
file.close();
}
return 0;
}
Re: Dialog positioning in GNOME
I tested and noticed the "wrong" behaviour on GNOME. It worked seamless on KDE and WinXP.
This problem might derive from X11's peculiarities, mentioned at: http://doc.trolltech.com/4.1/geometr...-peculiarities
Re: Dialog positioning in GNOME
I can imagine it would, but GNOME being one of the most widely used desktop enviroments on Linux, I would have thought that the Trolls would have found a way around this. That's if they know about it, of course ... I'll send in a bug report, and see what happens.