The problem, that when i run commoditie, all the applications windowses (like notpade, dopus4, etc), closes fine. But WB windowses are not. I.e. i press for example on "system" icon, have opened window, press by key-combo, and window not closes (but start to be inactive).
On os3 it works fine, and close all the windowses of any app, and WB itself too. Any ideas ?
@centaurz Imho code the same as my.. I changed also PUBLIC on SHARED => all the same. I also check window_bar_dockye - pretty strange works with closing of active windowses. It show meny for "close" only when window are not active, and for now i cant found how to close active window by that dookie.
But for example FKEY commoditie, works fine for "close window". Active it or not. Dunno through, which way it use (maybe not input.device, but something else?). What is a bit strange for me: why my code works for all the windowses, but not for WB ones ? I.e. for dopus4, for shell, for owb, for notepad, for any programm it works. But when i try to close by that combo WB window, it just start to be not-active, but not closes.
So now if you close the window of a running app, it will crash, so what is the use of this commodity? Is it just to remove windows of crashed apps from the WB?
If the app has a window open, and some other program comes along and closes the window, how is the original app to know that the window has been closed? On its first reference to the (non-existent) window after it has been closed, the app will crash.
Or are you not just closing the window from outside, but sending a "CloseWindow" command to the app?
He does not close the window. He sends the order to close the window to the application. The application can then still refuse to actually close its window. For the application the same happens as if the user clicked the close button.
For example when i "close" by commoditie dopus4, it ask "want you quit from dopus?". I.e. it not hardcore closing of window, it just the same action, which happenes when user press close gadget on any window of any programm.
yes, i know, question was about code in general. that commoditie about which i talk in the begining, do few more actions, which also can be handled by Fkey (swith screeen and alt+tab windowses), but while Fkey works buggy for window-switching (because of AmiDock), i port that my old tool (already on os4depot, called "awin") which do all of this fine. But yes, if you need only closing windowses , then Fkey are good enough for.