Multi Commander > Support and Feedback

focus lost and copied item not selected when CTRL+C then CTRL+V

<< < (2/2)

Mathias (Author):
Nope stealing focus from Windows does not work.  (Unless you hook your self into Windows and forces it. But that is a big no no.. It is not allowed)
Problem is that another app have taking focus from MC. (Windows or a ShellExtension)
And even I could steal focus. Doing it on when the filesystem is refreshed is bad.. It would make MC react weird.. It would make MC steal focus even if you was in another program that wrote a file to a location where MC was listing files.

However Windows did not steal focus like this before. Maybe something changed in windows. Maybe a Win10 issue. I don't know.


sickOfMS:
No, no, no you're not stealing focus from windows.
Your main app i.e. MC still has focus.
Do copy-paste file and then hit 'Alt' key ... you'll see that menu in MC will get underscored letters i.e. it'll act i.e. you can navigate and use your keyboard it's just that your child window of MC, which is in the end panel where the list of files, did lost focus. But you're still fine you're in MC so you can decide which window i.e. part of your UI you want to set focus to.
And as I said if you call SetFocus it is safe even if MC doesn't have focus and you call childOfMC->SetFocus(... then everything will still be fine Windows OS will not change focus, it will ignore you since your main app MC doesn't have focus. But in this copy-paste issue you're fine it will work.
It would take you only few minutes to call SetFocus inside you panel-list object that derives from CWnd (I guess it's the list UI element or something like that).
You don't have to call global windows ::SetFocus( but rather CWnd (parent) member i.e. this->SetFocus(

Mathias (Author):
I know. It is already calling setfocus.  but it is blocked or windows ignores it..


Navigation

[0] Message Index

[*] Previous page

Go to full version