I'm using fvwm to manage a few applications but I want the other
applications to be treated as if there is no window manager running. I
have nearly achieved this, but I'm running into some trouble with some
dialogs.

When there is no window manager running, these dialogs appear centered
over the main application. But when I have fvwm running, these dialogs
appear at the top left of the screen. If it makes any difference, the
application is a Qt 4 application, and I was able to reproduce it with
a simple Qt 4 application (included below).

Here is a simplified version of my .fvwm2rc (I verified that it
exhibits the same behavior):
#################################################
# Make fvwm act like X without a window manager #
#################################################
# Get rid of the title bar and borders.
Style * !Title, !Borders
# Don't go to other pages when the mouse gets to the edge of the screen.
EdgeThickness 0
# Don't do anything special when a transient window is created.
Style * DontStackTransientParent
# This makes all new windows appear at the top left corner unless they
specifically ask for a
# certain place on the screen.
Style * PositionPlacement
# Don't give the user any way to change focus.
Style * NeverFocus

Obviously, the problem is that the PositionPlacement style is taking
effect on these dialog windows, but I couldn't find an fvwm placement
style that worked the same way X works when no window manager is
present.

Thanks for any help, suggestions, or pointers,
-Tom Panning

P.S. Here's the Qt 4 code, in case anyone cares:

#include <QApplication>
#include <QWidget>
#include <QDialog>

int main(int argc, char** argv)
{
    QApplication app(argc, argv);
    QWidget* win = new QWidget;
    win->setFixedSize(400, 300);

    QDialog* dialog = new QDialog(win);
    dialog->setAutoFillBackground(true);
    QPalette myPalette = dialog->palette();
    myPalette.setColor(dialog->backgroundRole(), Qt::blue);
    dialog->setPalette(myPalette);
    dialog->setFixedSize(100, 50);

    win->show();
    dialog->show();
    return app.exec();
}

Reply via email to