I am trying to port an application developed on Ubuntu (Gnome) to openSUSE (KDE) and am finding quite a lot of problems even though I am using the same version of wx.Python (2.8.7.1). For example: wx.ListCtrl has a grey rather than white background, the font metrics are screwed up for printing and it is difficult to get the system to recognise a double click with the mouse.
The most serious problem is that applications invoked by my main application are obscured by it. I have even had the absurd situation that the dialog box produced by the window manager (KWin) to indicate that an application is not responding is covered by the application itself.
Can anybody tell me how to search the desktop for a window that I could use as the parent of a dialog box?
I am trying to port an application developed on Ubuntu (Gnome) to openSUSE (KDE) and am finding quite a lot of problems even though I am using the same version of wx.Python (2.8.7.1). For example: wx.ListCtrl has a grey rather than white background, the font metrics are screwed up for printing and it is difficult to get the system to recognise a double click with the mouse.
The most serious problem is that applications invoked by my main application are obscured by it. I have even had the absurd situation that the dialog box produced by the window manager (KWin) to indicate that an application is not responding is covered by the application itself.
Can anybody tell me how to search the desktop for a window that I could use as the parent of a dialog box?
Hi Chris! I am not sure why you attached the screenshot that I included earlier to this, but I can still attempt to answer your question. Have you tried wx.GetTopLevelParent()? There is also wx.GetTopLevelWindows(), which returns a list.
I am trying to port an application developed on Ubuntu (Gnome) to openSUSE (KDE) and am finding quite a lot of problems even though I am using the same version of wx.Python (2.8.7.1). For example: wx.ListCtrl has a grey rather than white background, the font metrics are screwed up for printing and it is difficult to get the system to recognise a double click with the mouse.
The most serious problem is that applications invoked by my main application are obscured by it. I have even had the absurd situation that the dialog box produced by the window manager (KWin) to indicate that an application is not responding is covered by the application itself.
Can anybody tell me how to search the desktop for a window that I could use as the parent of a dialog box?
Hi Chris! I am not sure why you attached the screenshot that I included earlier to this, but I can still attempt to answer your question. Have you tried wx.GetTopLevelParent()? There is also wx.GetTopLevelWindows(), which returns a list.
Sorry about the mistaken attachment. Your first suggestion is no use as the separate app has no top level parent as it is a dialog. I think your second suggestion is what I need - Thanks.
I am trying to port an application developed on Ubuntu (Gnome) to openSUSE (KDE) and am finding quite a lot of problems even though I am using the same version of wx.Python (2.8.7.1). For example: wx.ListCtrl has a grey rather than white background,
This is probably due to different GTK themes being used.
the font metrics are screwed up for printing
This probably means that it is using the old postscript printing backend instead of the newer libgnomeprint version. This is determined by flags passed to configure and also whether the development packages for libgnomeprint and libgnomeprintui are available on the build machine.
and it is difficult to get the system to recognise a double click with the mouse.
Not sure about this one.
The most serious problem is that applications invoked by my main application are obscured by it.
Newly spawned applications, or new windows in the same application?
I have even had the absurd situation that the dialog box produced by the window manager (KWin) to indicate that an application is not responding is covered by the application itself.
Probably just a timing issue. Kwin is sensing the lack of responding to events and is creating the notification window, and at nearly the same time your app starts responding to events again and then opens the new frame or dialog. If you haven't already you should read LongRunningTasks - wxPyWiki and Non-Blocking Gui - wxPyWiki and learn how to not get into a situation where your app is not responding to events for long blocks of time, (like more than a few hundred milliseconds.)
Can anybody tell me how to search the desktop for a window that I could use as the parent of a dialog box?
You can't make your dialog be the child of some other window from the system or another application. Either pass a window in your app to use as the parent, or pass None and let wx take care of it.
ยทยทยท
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!