Modal dialog on wxGTK moved behind parent

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
JeanPhi
Knows some wx things
Knows some wx things
Posts: 45
Joined: Fri Oct 20, 2006 9:54 am

Modal dialog on wxGTK moved behind parent

Post by JeanPhi »

Hi,

I would like to have modal dialog having the behaviour of Windows:

It should not move behind its parent when the parent Window is clicked.

Any idea how to do that ? I would like to avoid the "STAY_ON_TOP".

Should I play with the events and catch any lost focus from the modal Window ?

Thanks a lot,

Kind regards,

Jean-Philippe
wx 2.8.6, Windows XP, Dev-CPP 6.10.1 beta, MSVC 2005 Express
Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Post by Auria »

Hi,

I do not believe it is normal that modal dialogs can be moved behind their parent. Can you show some code? Especially make sure you specified a valid parent parameter.
JeanPhi
Knows some wx things
Knows some wx things
Posts: 45
Joined: Fri Oct 20, 2006 9:54 am

Post by JeanPhi »

Hi Auria,

Thanks for helping,

Actually it does not happened on KDE but on CDE as you can see on the screen shots I attached.

I used the dialogs sample provided by wx where the password dialog has its parent set to the main window (and not to NULL).

Any idea how the behaviour of KDE could be used on CDE ?

Thanks a lot,
Kind regards,

Jean-Philippe
Attachments
Window Scheme on CDE
Window Scheme on CDE
windowscheme.png (12.71 KiB) Viewed 3412 times
Window Scheme on KDE
Window Scheme on KDE
windowSchemeKDE.png (7.67 KiB) Viewed 3412 times
wx 2.8.6, Windows XP, Dev-CPP 6.10.1 beta, MSVC 2005 Express
Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Post by Auria »

Ah, this is using wxMotif right?

Unfortunately this port is rarely used. If possible, use wxGTK, which is much better maintained. Otherwise, if you can't, I'm afraid you may need to dig in the wxMotif code and fixm it yourself :(
JeanPhi
Knows some wx things
Knows some wx things
Posts: 45
Joined: Fri Oct 20, 2006 9:54 am

Post by JeanPhi »

Hi Auria,

No I am using wxGTK but it is causing problem when running under CDE.

The output I provided comes from the same application started on 2 different window managers.

Could it be that the Window manager itself provides some limitations with Modal dialogs ?

Thanks,

Jean-Philippe
wx 2.8.6, Windows XP, Dev-CPP 6.10.1 beta, MSVC 2005 Express
Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Post by Auria »

Weird, I read that CDE used Motif.

Yes it might be worth asking CDE folks; i don't think it's a commonly tested target for wxWidgets. It may be a limitation of their window manager, or an incompatibility with GTK.
Post Reply