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 » Tue Jan 13, 2009 2:32 pm

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 » Tue Jan 13, 2009 4:37 pm

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 » Wed Jan 14, 2009 10:35 am

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
windowscheme.png
Window Scheme on CDE
windowscheme.png (12.71 KiB) Viewed 2069 times
windowSchemeKDE.png
Window Scheme on KDE
windowSchemeKDE.png (7.67 KiB) Viewed 2069 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 » Wed Jan 14, 2009 5:05 pm

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 » Thu Jan 15, 2009 7:37 am

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 » Fri Jan 16, 2009 1:14 am

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