diff --git a/Source/Core/Controls/ImageSelectorPanel.cs b/Source/Core/Controls/ImageSelectorPanel.cs index 82f0315da16c47ed78f629882b620c1441d3015a..bdd2148431d2988d8eb9c808ddcd87bc8608697d 100755 --- a/Source/Core/Controls/ImageSelectorPanel.cs +++ b/Source/Core/Controls/ImageSelectorPanel.cs @@ -408,6 +408,9 @@ namespace CodeImp.DoomBuilder.Controls protected override void OnMouseDoubleClick(MouseEventArgs e) { base.OnMouseDoubleClick(e); + //TODO: testing this on Windows, it looks like General.Interface.CtrlState and + // General.Interface.ShiftState are always false, because as the main window + // doesn't have focus and won't update these states if(General.Interface.CtrlState || General.Interface.ShiftState || selection.Count != 1) return; diff --git a/Source/Core/Windows/MainForm.cs b/Source/Core/Windows/MainForm.cs index 52cfa7d08db69b0b85bce23d14c4e297dad0c81b..83dcb59685bb3173ccdcb572cbd2b2bd2c68b2d1 100755 --- a/Source/Core/Windows/MainForm.cs +++ b/Source/Core/Windows/MainForm.cs @@ -4158,14 +4158,41 @@ namespace CodeImp.DoomBuilder.Windows // Returns the new texture name or the same texture name when cancelled public string BrowseTexture(IWin32Window owner, string initialvalue) { - return TextureBrowserForm.Browse(owner, initialvalue, false);//mxd + + DisableProcessing(); + #if MONO_WINFORMS + //Mono's Winforms treat dialogs a little differently + // they don't implicitly take focus from the parent window + // and keyboard input from focus window isn't reset when the dialog takes focus + BreakExclusiveMouseInput(); + ReleaseAllKeys(); + #endif + string tex = TextureBrowserForm.Browse(owner, initialvalue, false);//mxd + #if MONO_WINFORMS + ResumeExclusiveMouseInput(); + #endif + EnableProcessing(); + return tex; } // This browses for a flat // Returns the new flat name or the same flat name when cancelled public string BrowseFlat(IWin32Window owner, string initialvalue) { - return TextureBrowserForm.Browse(owner, initialvalue, true); //mxd. was FlatBrowserForm + DisableProcessing(); + #if MONO_WINFORMS + //Mono's Winforms treat dialogs a little differently + // they don't implicitly take focus from the parent window + // and keyboard input from focus window isn't reset when the dialog takes focus + BreakExclusiveMouseInput(); + ReleaseAllKeys(); + #endif + string tex = TextureBrowserForm.Browse(owner, initialvalue, true); //mxd. was FlatBrowserForm + #if MONO_WINFORMS + ResumeExclusiveMouseInput(); + #endif + EnableProcessing(); + return tex; } // This browses the lindef types