I have an app, running on Linux, which is comprised of a VkMainWindow and several VkWindows. The desired behavior is to keep the VkMainWindow always on the bottom (and hence, all the VkWindows always on top of the VkMainWindow). The existing code works as advertised on KDE, but the customer decided it needs to run under MWM. Running under MWM, the VkMainWindow raises above the VkWindows. Any ideas?
VkMainWindow:
MainWindow::MainWindow(MyContainer const &container, ArgList args, Cardinal argc)
:
BaseWindow("My Base Window", args, argc,
_statusWindow(new StatusWindow(container)),
m_helpDialog(new MainHelpDialog),
m_container(container),
m_frame(nullptr),
m_form(nullptr),
_button1(nullptr),
_widget1(nullptr),
m_button2(nullptr),
m_widget2(nullptr),
m_button2(nullptr),
m_widget3(nullptr),
m_button3(nullptr),
m_button4(nullptr),
m_button5(nullptr),
m_widget4(nullptr),
_label1(nullptr),
_label2(nullptr),
_label3(nullptr),
_label4(nullptr),
_label5(nullptr),
_label6(nullptr),
_label7(nullptr)
{
Display *mainDisplay;
mainDisplay = XOpenDisplay(0);
if (mainDisplay)
{
m_width = m_mainWindowWidth = 1280;
m_height = m_mainWindowHeight = 1024;
XCloseDisplay(mainDisplay);
}
XtVaSetValues(m_shellWidget, XmNmwmFunctions, MWM_FUNC_MOVE | MWM_FUNC_MINIMIZE, XmNx, 0, XmNy, 0, NULL);
m_configFile = currentWorkspace;
}
VkWindows:
BaseWindow::BaseWindow(string const &name, ArgList args, Cardinal argc,
unsigned int createOptions, bool createTabStack, bool removeCornerFunctions, bool scrollable, bool workspaceConfigurable)
:
VkWindow(name.c_str(), args, argc), _mainForm(0), _mainOffset(
MAIN_OFFSET), _buttonSpacing(BUTTON_SPACING), _createOptions(createOptions),
_createTabStack(createTabStack), _statusText(0), m_buttonBoxForm(0), m_helpForm(0),
m_okButton(0), m_cancelButton(0), m_applyButton(0), m_applyCb(0), m_okCb(0), m_cancelCb(0),
m_screenId(INVALID_SCREEN_ID), m_previousTab(0), _tabStack(0), _tabForm(0), m_initialized(false),
m_shellWidget(0), m_clipWindow(0), _isScrollable(scrollable), m_isValid(true), m_statusOnly(false),
m_validateOnOk(true), m_validateOnApply(true), m_widgetsMapped(false), m_fooLocked(false), m_isLocked(false),
m_currentSize(FULL), m_lastSize(0)
{
Widget parent = mainWindowWidget();
XtSetValues(parent, args, argc);
m_shellWidget = parent;
while (m_shellWidget && !XtIsShell(m_shellWidget))
{
m_shellWidget = XtParent(m_shellWidget);
}
if (removeCornerFunctions)
{
if (m_shellWidget)
{
XtVaSetValues(m_shellWidget,
XmNmwmFunctions, 22,
// MWM_FUNC_RESIZE | MWM_FUNC_MOVE | MWM_FUNC_MINIMIZE | MWM_FUNC_CLOSE,
NULL);
XtAddEventHandler(m_shellWidget, StructureNotifyMask, false, resizeCb, this);
}
}
...
}
Main:
int main(int argc, char **argv)
{
...
Cardinal ac;
Arg args[20];
std::string title("My Client");
XrmOptionDescRec *optionList = NULL;
int numOptions = 0;
app = new VkApp(const_cast<char*>(title.c_str()), &argc, argv, optionList, numOptions);
...
app->run();
...
return (0);
}