dcs-scratchpad icon indicating copy to clipboard operation
dcs-scratchpad copied to clipboard

Closing Window with Focus on it

Open Der-Orso opened this issue 4 years ago • 6 comments

If you close the window with the input-focus still on it, the input-focus is locked to the now closed window, which can lead to some very bad things -- for the user. It feels like DCS had gone crazy, bc so many things then do not work.

Suggestion: rescind the focus (emulate <Esc>) on close.

Der-Orso avatar Aug 04 '19 08:08 Der-Orso

That is strange! I am unable to reproduce. When I close the Scratchpad the focus is always removed correctly. Code doing that looks also good https://github.com/rkusa/dcs-scratchpad/blob/master/Scripts/Hooks/scratchpad-hook.lua#L173-L177 🤔

rkusa avatar Aug 13 '19 18:08 rkusa

I'll have to try it again. Maybe there's some influence through SRS as well, because I'm using both at the same time practically always.

I recently had it happen again -- a couple of days ago--, and couldn't even open Scratchpad again, but I don't recall having tried to do anything with SRS at the time either.

BTW I don't code lua -- never gotten around to learning this weird world of OO programming o.O -- maybe one day. I want to write a simple add-on to manage button modifiers, if I ever get around to it.

Der-Orso avatar Aug 19 '19 16:08 Der-Orso

BTW I just wanted to give a little update on this issue. I ran into it again and I think is only has to do with the mouse pointer escaping the DCS "window" while clicking near the edge of the visible area in VR. Somehow the input focus is moved to Windows™ with possible catastrophic results.

I have the -mouse pointer doesn't escape window- setting active, but I recall reading that for that to actually work 100% of the time, you have to be in "real full-screen" mode, because in DCS there is apparently "DCS full screen" and "real full screen"... yeah... and I always forget to turn that on (RCtrl-Enter iirc).

On 8/13/2019 8:28 PM, Markus Ast wrote:

That is strange! I am unable to reproduce. When I close the Scratchpad the focus is always removed correctly. Code doing that looks also good https://github.com/rkusa/dcs-scratchpad/blob/master/Scripts/Hooks/scratchpad-hook.lua#L173-L177 🤔

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rkusa/dcs-scratchpad/issues/5?email_source=notifications&email_token=AJUQ5VEE4V7PQ5HBFJ3RXCTQEL4OPA5CNFSM4IJEWWZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4GRZSQ#issuecomment-520953034, or mute the thread https://github.com/notifications/unsubscribe-auth/AJUQ5VBFWZYG4UW5UXMSQVLQEL4OPANCNFSM4IJEWWZA.

Der-Orso avatar Oct 26 '19 16:10 Der-Orso

That is strange, I don't use DCS in full-screen mode and also in VR and for me it is impossible to click outside the window. While I remember it happened a while ago in DCS, it was apparently fixed for me. Anyway, thanks for the update, I'll still check whether I can reproduce it by explicitly trying to click outside of the DCS window 👍

rkusa avatar Nov 18 '19 16:11 rkusa

I don't know if my issue is similar or not but I do get an issue with the DCS chat not closing and for example F10 not working. I didn't think it was because of this plugin before until someone I know installed it and got the same issue.

TheBlackFox27 avatar Jul 30 '22 12:07 TheBlackFox27

@TheBlackFox27 As long as the text field of the Scratchpad has focus, it captures all (or at least most) keyboard inputs. You probably have to remove the focus before using the shortcuts to close the chat or open the F10 map.

rkusa avatar Jul 31 '22 08:07 rkusa

Closing for now as cannot-reproduce. If anyone encountered this, too, please still add your evidence, thanks!

rkusa avatar Sep 04 '22 13:09 rkusa