tags:

views:

42

answers:

1

I have a Motif-based notepad-like legacy application.

I would like the modeless "Find/Replace" dialog (which is a Motif TopLevelShell) to always stay on top of the other windows of my application, but not on top of other applications.

I don't see any Motif-specific setting to do this.
KDE allows me to set window-specific behavior, but I can only make the "Find/Replace" window stay on top of all windows, which isn't right.

What is the correct way to force one of my application windows to stay on top of the other windows of the same application? Is it possible at all? Is there a way to do it in Motif? KDE? Do I have to drop down to an X call?

A: 

You can subclass KDialog http://api.kde.org/4.x-api/kdelibs-apidocs/kdeui/classKDialog.html#10744dda705aa265a43becab32a43ea4

with Qt::WA_ShowModal attribute http://doc.qt.nokia.com/4.0/qt.html#WindowType-enum

KDialog dialog(parent, Qt::WA_ShowModal)
dialog.exec()

Maybe it's not what you want, but ...

jgoday
Thank you for the suggestion. For legacy reasons I'm using Motif widgets, and my window is a TopLevelShell, so this isn't available to me.
Bill