wx.PopupWindow too powerful

In both Windows and Linux (2.9.4.0), wx.PopupWindow stays on top of any window, including those of external applications. Is there any way to only keep it on top of the wxPython application while still supporting the ability to drag other windows over the top of it?

You could open the window another way.

def Back(self, event):

 Mainwindow=MainMenu(parent=None, id=-1)

 Mainwindow.Show()  

 self.Close()

That’s how my Windows open anyway.

···

On Tuesday, February 19, 2013 8:11:32 PM UTC, Mears wrote:

In both Windows and Linux (2.9.4.0), wx.PopupWindow stays on top of any window, including those of external applications. Is there any way to only keep it on top of the wxPython application while still supporting the ability to drag other windows over the top of it?

What are the wx types of self and MainMenu in this example?

···

On Tuesday, February 19, 2013 2:42:00 PM UTC-7, Sion Jones wrote:

You could open the window another way.

def Back(self, event):

 Mainwindow=MainMenu(parent=None, id=-1)
 Mainwindow.Show()  
 self.Close()

That’s how my Windows open anyway.

On Tuesday, February 19, 2013 8:11:32 PM UTC, Mears wrote:

In both Windows and Linux (2.9.4.0), wx.PopupWindow stays on top of any window, including those of external applications. Is there any way to only keep it on top of the wxPython application while still supporting the ability to drag other windows over the top of it?

Got Button binding, Menu Bar binding, “self.Close()”. I’m new to WxPython, so I’m not sure what self does. I’ve just been following examples.

Just thought I’d share another example of opening a windows, without it being on top all the time.

···

On Wednesday, February 20, 2013 5:15:18 PM UTC, Mears wrote:

What are the wx types of self and MainMenu in this example?

On Tuesday, February 19, 2013 2:42:00 PM UTC-7, Sion Jones wrote:

You could open the window another way.

def Back(self, event):

 Mainwindow=MainMenu(parent=None, id=-1)
 Mainwindow.Show()  
 self.Close()

That’s how my Windows open anyway.

On Tuesday, February 19, 2013 8:11:32 PM UTC, Mears wrote:

In both Windows and Linux (2.9.4.0), wx.PopupWindow stays on top of any window, including those of external applications. Is there any way to only keep it on top of the wxPython application while still supporting the ability to drag other windows over the top of it?

Mears wrote:

In both Windows and Linux (2.9.4.0), wx.PopupWindow stays on top of
any window, including those of external applications. Is there any
way to only keep it on top of the wxPython application while still
supporting the ability to drag other windows over the top of it?

Not by using wx.PopupWindow. That is a separate standalone window with
"topmost" set.

It sounds like a PopupWindow is not really what you want. If you just
want a child window that happens to be on the top of your Z-order, then
do that. Create another frame and place it by hand. Depending on what
you need, you also have the option of using a modal dialog.

···

--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

Well, the big advantage of popup window is it doesn’t open a separate frame. I’m using it to create an Ajax style spinners during long delays and also a custom popup menus. Having a new entry in the taskbar when a spinner or menu pops up isn’t desireable. I do want it to be “topmost” on the current application, but people are really shocked when you drag firefox over my application and a widget from my application covers part of it.

···

On Wednesday, February 20, 2013 10:50:13 AM UTC-7, Tim Roberts wrote:

Mears wrote:

In both Windows and Linux (2.9.4.0), wx.PopupWindow stays on top of

any window, including those of external applications. Is there any

way to only keep it on top of the wxPython application while still

supporting the ability to drag other windows over the top of it?

Not by using wx.PopupWindow. That is a separate standalone window with

“topmost” set.

It sounds like a PopupWindow is not really what you want. If you just

want a child window that happens to be on the top of your Z-order, then

do that. Create another frame and place it by hand. Depending on what

you need, you also have the option of using a modal dialog.


Tim Roberts, ti...@probo.com

Providenza & Boekelheide, Inc.

Mears wrote:

Well, the big advantage of popup window is it doesn't open a separate
frame.

Are you talking about the decorations? Because in terms of the
underlying GUI systems, it absolutely DOES open a separate top-level
window, owned by the desktop.

I'm using it to create an Ajax style spinners during long delays and
also a custom popup menus. Having a new entry in the taskbar when a
spinner or menu pops up isn't desireable. I do want it to be
"topmost" on the current application, but people are really shocked
when you drag firefox over my application and a widget from my
application covers part of it.

You ought to be able to do this by just creating a new panel. Do you
need to disable the rest of the GUI while it is displayed?

···

--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

Are you talking about the decorations? Because in terms of the

underlying GUI systems, it absolutely DOES open a separate top-level

window, owned by the desktop.

Not just the frame decorations (border, buttons, etc), but when you create a frame the window manager will create a new entry on the task bar.

You ought to be able to do this by just creating a new panel. Do you

need to disable the rest of the GUI while it is displayed?

Disabling the GUI isn’t necessary. According to the docs, PopupWindow is tailor made for implementing fancy popup windows. There are even comments in other sections of the demo that create popups, “should change this to PopupWindow”. Just run the popup window demo and click one of the buttons. You get a nice fancy popup. Now drag any other application (terminal, web browser, etc) over the demo. Doesn’t the behavior violoate the principal of least surprise? I can’t think of any other application I’ve used that works this way. PopupWindow offers some neat capability, but if it’s to work like real popups, it shouldn’t stomp on other applications. Agree?

I definitely agree that this behavior is not what one could expect.

A possible workaround (until this behavior is corrected in the upstream) is to listen to the FOCUS event on the related window. So, when focus is lost, then popup is hidden, when focus is acquired again, then popup is shown.

···

On Wednesday, February 20, 2013 8:25:08 PM UTC+1, Mears wrote:

Are you talking about the decorations? Because in terms of the

underlying GUI systems, it absolutely DOES open a separate top-level

window, owned by the desktop.

Not just the frame decorations (border, buttons, etc), but when you create a frame the window manager will create a new entry on the task bar.

You ought to be able to do this by just creating a new panel. Do you

need to disable the rest of the GUI while it is displayed?

Disabling the GUI isn’t necessary. According to the docs, PopupWindow is tailor made for implementing fancy popup windows. There are even comments in other sections of the demo that create popups, “should change this to PopupWindow”. Just run the popup window demo and click one of the buttons. You get a nice fancy popup. Now drag any other application (terminal, web browser, etc) over the demo. Doesn’t the behavior violoate the principal of least surprise? I can’t think of any other application I’ve used that works this way. PopupWindow offers some neat capability, but if it’s to work like real popups, it shouldn’t stomp on other applications. Agree?