window focus after close of window leaves app Topic is solved

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
insolence
Earned a small fee
Earned a small fee
Posts: 15
Joined: Wed Sep 26, 2007 10:19 pm

window focus after close of window leaves app

Post by insolence » Sat Sep 29, 2007 8:04 pm

I have two windows, one closes with Destroy() but the focus doesn't return to the other window. I've tried having a dummy parent window passed to first arg of Create for both windows to no affect. Also I've tried doing firstwindow->SetFocus() right before the secondwindow calls Destroy().

The window focus always leaves the app and the firstwindow->SetFocus() seems to do nothing.

protocol
Moderator
Moderator
Posts: 680
Joined: Wed Jan 18, 2006 6:13 pm
Location: Dallas, TX
Contact:

Post by protocol » Mon Oct 01, 2007 2:42 pm

What OS are you using? If windows, try calling firstwindow->Show(TRUE) again.

best regards.
/* UIKit && wxWidgets 2.8 && Cocoa && .Net */
QuRegExmm
wxPCRE & ObjPCRE - Regex It!

insolence
Earned a small fee
Earned a small fee
Posts: 15
Joined: Wed Sep 26, 2007 10:19 pm

Post by insolence » Tue Oct 02, 2007 6:45 pm

I assume that firstwindow->Show() defaults to firstwindow->Show(TRUE). But I have tried both to no effect.

However, recently I tried having the second window inherit from wxDialog instead of from an object inheriting from wxFrame. Someone mentioned that dialogs "have different semantics" from toplevelwindows, on IRC.

But I tried this and it changed nothing. Perhaps I'm doing it wrong somehow. I'm really at a loss, its been days with this one simple problem.

I'm thinking it has something to do with the parent window not being specified properly or both windows not sharing a common parent or something. But I am specifying firstwindow as the first argument to Create.

I need to know why the app loses focus when that second window closes. Its like it thinks that the app has closed when the second window closes instead of switching to the first window, but no one seems to know the answer to this.

protocol
Moderator
Moderator
Posts: 680
Joined: Wed Jan 18, 2006 6:13 pm
Location: Dallas, TX
Contact:

Post by protocol » Tue Oct 02, 2007 9:17 pm

Please answer the question, What OS are you using? Or is it cross-platform? What version of wxWidgets are you using?

best regards.
/* UIKit && wxWidgets 2.8 && Cocoa && .Net */
QuRegExmm
wxPCRE & ObjPCRE - Regex It!

insolence
Earned a small fee
Earned a small fee
Posts: 15
Joined: Wed Sep 26, 2007 10:19 pm

Post by insolence » Wed Oct 03, 2007 12:18 am

I hope its cross platform. ;-) wxGTK 2.8.5, linux

insolence
Earned a small fee
Earned a small fee
Posts: 15
Joined: Wed Sep 26, 2007 10:19 pm

Post by insolence » Wed Oct 03, 2007 6:45 pm

It appears this is a problem with my window manager enlightenment since the wx samples "dialogs" app has the same problem but does not have that problem within my half working gnome installation. So who knows. The usual bullshit I guess. I'm trying to find someone who knows something about my window manager now.

Edit:

The latest enlightenment cvs code fixes the issue.

Post Reply