Dialog boxes won't stay on top

Hi all,

My problem may be unique to my environment, but I was hoping someone
might have suggestions. My product runs on Solaris 10, using the
Common Desktop Environment (CDE), with python2.5, wxPython 2.6.3.3,
and GDK 2.6. Our choice of CDE is related to performance. I should
note that this problem does **not** occur with the Java Desktop.

The problem is that when I pop up a dialog, if the user moves the
mouse and clicks on the main frame, the frame pops to the front and
obscuring the dialog. My app uses ShowFullScreen, with little-to-no
ability to get behind the frame, so, particularly with modal dialogs,
this very effectively hangs the app.

I've tried specifically setting STAY_ON_TOP without success.

I also implemented an EVT_IDLE handler that calls Show on the dialog.
This seems to work fine if there is only one dialog up. But there I
have cases where there may be more than one that overlap. This causes
the overlapping dialogs to battle for the top endlessly, and is not
useful.

I'm considering implementing some kind of dialog manager that queues
dialog requests and only allows one at a time. I'd like to avoid this
if possible.

Any thoughts would be greatly appreciated!

-Chris Botos

The problem almost certainly resides in your window manager - wx (or
gdk) can't make a window stay on top if the window manager won't keep
it there. I'm afraid I don't have any particular solution for you
other than a) confirming the problem by making sure that the dialogs
have the right xprops set and b) filing a bug report with Sun.

···

On Jan 14, 2008 8:30 AM, chris botos <chris.botos@gmail.com> wrote:

Hi all,

My problem may be unique to my environment, but I was hoping someone
might have suggestions. My product runs on Solaris 10, using the
Common Desktop Environment (CDE), with python2.5, wxPython 2.6.3.3,
and GDK 2.6. Our choice of CDE is related to performance. I should
note that this problem does **not** occur with the Java Desktop.

The problem is that when I pop up a dialog, if the user moves the
mouse and clicks on the main frame, the frame pops to the front and
obscuring the dialog. My app uses ShowFullScreen, with little-to-no
ability to get behind the frame, so, particularly with modal dialogs,
this very effectively hangs the app.

I've tried specifically setting STAY_ON_TOP without success.

I also implemented an EVT_IDLE handler that calls Show on the dialog.
This seems to work fine if there is only one dialog up. But there I
have cases where there may be more than one that overlap. This causes
the overlapping dialogs to battle for the top endlessly, and is not
useful.

I'm considering implementing some kind of dialog manager that queues
dialog requests and only allows one at a time. I'd like to avoid this
if possible.

Any thoughts would be greatly appreciated!

chris botos wrote:

Hi all,

My problem may be unique to my environment, but I was hoping someone
might have suggestions. My product runs on Solaris 10, using the
Common Desktop Environment (CDE), with python2.5, wxPython 2.6.3.3,
and GDK 2.6. Our choice of CDE is related to performance. I should
note that this problem does **not** occur with the Java Desktop.

The problem is that when I pop up a dialog, if the user moves the
mouse and clicks on the main frame, the frame pops to the front and
obscuring the dialog. My app uses ShowFullScreen, with little-to-no
ability to get behind the frame, so, particularly with modal dialogs,
this very effectively hangs the app.

I've tried specifically setting STAY_ON_TOP without success.
  

Does wx.FRAME_FLOAT_ON_PARENT help?
Stani

Thanks for the response, Chris.
Where do I look for or set the xprops?
-Chris

···

On Jan 14, 2008 9:38 AM, Chris Mellon <arkanes@gmail.com> wrote:

On Jan 14, 2008 8:30 AM, chris botos <chris.botos@gmail.com> wrote:
> Hi all,
>
> My problem may be unique to my environment, but I was hoping someone
> might have suggestions. My product runs on Solaris 10, using the
> Common Desktop Environment (CDE), with python2.5, wxPython 2.6.3.3,
> and GDK 2.6. Our choice of CDE is related to performance. I should
> note that this problem does **not** occur with the Java Desktop.
>
> The problem is that when I pop up a dialog, if the user moves the
> mouse and clicks on the main frame, the frame pops to the front and
> obscuring the dialog. My app uses ShowFullScreen, with little-to-no
> ability to get behind the frame, so, particularly with modal dialogs,
> this very effectively hangs the app.
>
> I've tried specifically setting STAY_ON_TOP without success.
>
> I also implemented an EVT_IDLE handler that calls Show on the dialog.
> This seems to work fine if there is only one dialog up. But there I
> have cases where there may be more than one that overlap. This causes
> the overlapping dialogs to battle for the top endlessly, and is not
> useful.
>
> I'm considering implementing some kind of dialog manager that queues
> dialog requests and only allows one at a time. I'd like to avoid this
> if possible.
>
> Any thoughts would be greatly appreciated!
>

The problem almost certainly resides in your window manager - wx (or
gdk) can't make a window stay on top if the window manager won't keep
it there. I'm afraid I don't have any particular solution for you
other than
a) confirming the problem by making sure that the dialogs
have the right xprops set and b) filing a bug report with Sun.

Run xprop | grep MODAL and then click on the dialog. You might also
want to make sure that it has WM_TRANSIENT_FOR with the correct parent
set.

···

On Jan 14, 2008 9:25 AM, chris botos <chris.botos@gmail.com> wrote:

On Jan 14, 2008 9:38 AM, Chris Mellon <arkanes@gmail.com> wrote:
>
> On Jan 14, 2008 8:30 AM, chris botos <chris.botos@gmail.com> wrote:
> > Hi all,
> >
> > My problem may be unique to my environment, but I was hoping someone
> > might have suggestions. My product runs on Solaris 10, using the
> > Common Desktop Environment (CDE), with python2.5, wxPython 2.6.3.3,
> > and GDK 2.6. Our choice of CDE is related to performance. I should
> > note that this problem does **not** occur with the Java Desktop.
> >
> > The problem is that when I pop up a dialog, if the user moves the
> > mouse and clicks on the main frame, the frame pops to the front and
> > obscuring the dialog. My app uses ShowFullScreen, with little-to-no
> > ability to get behind the frame, so, particularly with modal dialogs,
> > this very effectively hangs the app.
> >
> > I've tried specifically setting STAY_ON_TOP without success.
> >
> > I also implemented an EVT_IDLE handler that calls Show on the dialog.
> > This seems to work fine if there is only one dialog up. But there I
> > have cases where there may be more than one that overlap. This causes
> > the overlapping dialogs to battle for the top endlessly, and is not
> > useful.
> >
> > I'm considering implementing some kind of dialog manager that queues
> > dialog requests and only allows one at a time. I'd like to avoid this
> > if possible.
> >
> > Any thoughts would be greatly appreciated!
> >
>
>
> The problem almost certainly resides in your window manager - wx (or
> gdk) can't make a window stay on top if the window manager won't keep
> it there. I'm afraid I don't have any particular solution for you
> other than
> a) confirming the problem by making sure that the dialogs
> have the right xprops set and b) filing a bug report with Sun.
>

Thanks for the response, Chris.
Where do I look for or set the xprops?
-Chris

chris botos wrote:

chris botos wrote:

Hi all,
My problem may be unique to my environment, but I was hoping someone
might have suggestions. My product runs on Solaris 10, using the
Common Desktop Environment (CDE), with python2.5, wxPython 2.6.3.3,
and GDK 2.6. Our choice of CDE is related to performance. I should
note that this problem does **not** occur with the Java Desktop.
The problem is that when I pop up a dialog, if the user moves the
mouse and clicks on the main frame, the frame pops to the front and
obscuring the dialog. My app uses ShowFullScreen, with little-to-no
ability to get behind the frame, so, particularly with modal dialogs,
this very effectively hangs the app.
I've tried specifically setting STAY_ON_TOP without success.
Does wx.FRAME_FLOAT_ON_PARENT help?
Stani
I just gave this a try, but unfortunately had no effect.
Thanks Stani,
-Chris

How about binding an event method to raise the dialog as soon as it
looses focus?

Stani

···

spe.stani.be@gmail.com

I was diverted to another task for a bit ...
Won't this will have the same effect as my OnIdle experiment? When a
dialog pops up over another, the first loses focus (Is that true?) and
similarly pops over the second, etc. I'll try this today.

Thanks so much Stani to you and Chris for your help and suggestions.

-Chris

···

On Jan 14, 2008 10:35 AM, Stani <spe.stani.be@gmail.com> wrote:

chris botos wrote:

On Jan 14, 2008 9:53 AM, Stani <spe.stani.be@gmail.com> wrote:

chris botos wrote:

Hi all,

My problem may be unique to my environment, but I was hoping
someone
might have suggestions. My product runs on Solaris 10, using
the
Common Desktop Environment (CDE), with python2.5, wxPython 2.6.3.3,
and
GDK 2.6. Our choice of CDE is related to performance. I should
note that
this problem does **not** occur with the Java Desktop.

The problem is that
when I pop up a dialog, if the user moves the
mouse and clicks on the main
frame, the frame pops to the front and
obscuring the dialog. My app uses
ShowFullScreen, with little-to-no
ability to get behind the frame, so,
particularly with modal dialogs,
this very effectively hangs the app.

I've
tried specifically setting STAY_ON_TOP without success.

Does wx.FRAME_FLOAT_ON_PARENT help?
Stani

I just gave this a try, but unfortunately had no effect.
Thanks
Stani,
-Chris

How about binding an event method to raise the dialog as soon as it looses
focus?
Stani