Pet bug bounty
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, LCMark
Re: Pet bug bounty
@malte: Although the code you found is C# related it does help clarify things (WinForms is based on Win32, so they have the same low-level APIs to play with) - indeed, I did a quick test and it seems that setting the 'owner' window of the modal (in MCScreenDC::openwindow) is enough to make alt-Tab work correctlyish... Unfortunately, it then hits a problem with window focus when switching between apps which needs to be investigated. I think perhaps the correct place to set owners and such is in MCScreenDC::enableformodal which iterates over the stacks and ensures modals (of all types) are correctly enabled. So, some progress at least...
Re: Pet bug bounty
Hey Mark,
so this is one bottle for you already then
I thought I saw a C++ implementation on the MSDN site:
But as this is still a little over my head I might be mistaken.
Best,
Malte
so this is one bottle for you already then
I thought I saw a C++ implementation on the MSDN site:
Code: Select all
// C++
private:
System::Void mnuAbout_Click(System::Object * sender,
System::EventArgs * e)
{
Form * f = new Form();
f->ShowDialog(this);
}
Best,
Malte
Re: Pet bug bounty
@malte: That's managed C++ calling the WinForms (.NET) framwork. The engine uses native C++ and Win32 - however, the key piece gained from that code is that it is the setting of the 'owner' link on the Win32 window that's the key piece which at least tells us how to solve the problem (assuming the focus problem it uncovers is fixed)
Re: Pet bug bounty
As I had a complaint about this in one of my apps again, I raise the bounty by another bottle, so whoever fixes this now can get seriously tipsy.
Cheers,
Malte
Cheers,
Malte
-
- VIP Livecode Opensource Backer
- Posts: 9867
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Pet bug bounty
Does the behavior in other programs differ if the dialog is document-modal rather than application-modal ("...as sheet" will give you document-modal in LC, odd syntax given that there's no sheet effect but oh well)? If so, does LC reflect that same difference?malte wrote:Actually no, as far as I can see it is not. Or at least there are other Windows programs that can have modals open and can be alt tabbed back to.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- VIP Livecode Opensource Backer
- Posts: 3581
- Joined: Mon Jan 22, 2007 7:36 am
- Location: Berkeley, CA, US
- Contact:
Re: Pet bug bounty
Looking over this thread again, I see that both Microsoft apps and LC don't do "real" modal dialogs, but fake them. Real modal dialogs would block other system messages and exhibit the kind of behavior you're seeing, where alt-Tab is blocked. So Microsoft fakes it instead by disabling the parent window but not making the foreground window modal. That's why you can still use alt-Tab in MS apps.
LC also doesn't use real modal dialogs, for the same reason. Any application that does do real modal blocking will... er... block. Applications that are build with MFC do the fake thing instead of real modal dialogs, so they'll be immune to this.
LC also doesn't use real modal dialogs, for the same reason. Any application that does do real modal blocking will... er... block. Applications that are build with MFC do the fake thing instead of real modal dialogs, so they'll be immune to this.
PowerDebug http://powerdebug.ahsoftware.net
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
-
- VIP Livecode Opensource Backer
- Posts: 1005
- Joined: Sat Apr 08, 2006 3:06 pm
- Location: Overland Park, Kansas
- Contact:
Re: Pet bug bounty
I would really love to see this one get fixed as well. I have had customers complain about this for years.
Trevor DeVore
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder