Re: Desktop as transient window



Paul,

On Mon, Aug 10, 2015 at 12:33 PM, Paul Davis <paul linuxaudiosystems com> wrote:
On Mon, Aug 10, 2015 at 12:31 PM, Igor Korot <ikorot01 gmail com> wrote:
Jasper,

On Sun, Aug 9, 2015 at 7:19 PM, Jasper St. Pierre <jstpierre mecheye net> wrote:
The desktop is not a window. It could be in some desktop environments,
but is not always. In fact, in some desktop environments, there is no
desktop window or desktop concept at all. There is no standard
protocol to fetch the desktop window if it exists, either.

The reason that unparented dialogs are discouraged are because in most
cases, dialogs shouldn't just pop up out of the blue -- they should
come from an understandable user action or application window to tie
it back to. Otherwise, you might see a random dialog pop up at some
point without knowing where it came from.

I understand this part.
The trouble is - what if the application is dialog based?

Let's say by design of my application it starts up by displaying the
dialog with some options
and after that the main window shows up after I click OK.

How do I handle this?

This has nothing to do with setting a transient parent, which is a
specialized operation that is actually the wrong thing to do on some
platforms anyway.

In the use case you describe: you show the options dialog, when the
user activates a dialog response you hide (or destroy) the dialog, and
show the main window.

IIUC, in this specific case I should create the main frame, hide it and then
set the parent for my options dialog to be this main frame. Then after
the user hit
OK, I kill the dialog and display (show) the main frame.

Am I understajnd correctly?

Thank you.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]