How to group several wxFrame-windows making them to be activated together - cocoa

I need to make activation (i.e. putting on top) of a one wxFrame window trigger activation of a second (and visa versa) for both Windows and Mac.
I think the main problem here is the Mac, since it seems there's no way to activate specific window programmatically (am I wrong here?).
When I try to put both windows into a parent container on Mac (changing wxFrames into wxWindows), the their borders and title bars disappear.
Is there an easy way to solve the problem?

Related

Disable auto-raise windows in LibreOffice

Apologies if this isn't the right place to ask about LibreOffice, but I didn't see another site more appropriate.
If I have two LibreOffice documents open simultaneously with one overlapping the other, I find that floating my mouse pointer over the toolbar buttons in the background window (without clicking) brings that window to the foreground, covering the document I was trying to work with. But the focus doesn't change. If I type, those characters are typed into the now-in-back document window, not the one on front. It's super-annoying.
Is this a setting that I can disable? Usually, it's the window-manager that is in charge of raising windows, but LO seems to be doing it by itself.
When neither of the two document-windows has the focus (e.g. a web browser or whatever is in the foreground), the LO windows still behave the same way, but they do not come to the foreground... they just swap their foreground/background position relative to each other.
This is on LibreOffice 7.4.5.1, but it was happening with whatever version I just upgraded from as well (I upgraded to see if this was "fixed"). It was probably 7.2.something. I'm on x86-84 MacOS Ventura.

How to recognize a Microsoft Edge window distinct from a Skype window?

I get list of windows with Win32.EnumWindows and then filter them to keep the ones I want. I want to keep the normal, visible Skype window and skip the hidden Microsoft Edge window. (I use Chrome, and no accessible instances of Edge are visible in my Alt-TAB output or on my screen.)
I already filter out a few Edge windows that are of class Windows.UI.Core.CoreWindow but there is one Edge window still in the list. Maybe it is a main or parent window or something? Maybe the Task Manager window or the Settings windows that I have open are Edge underneath the hood?
I dumped the properties of both Skype and Edge windows, and they are the same for the items that I looked at. (I recognize that having WS_VISIBLE set does not mean that I get to see the window.) Here are the items that are identical for both windows.
Skype window: (Identical to the output for the Edge window that I can't see.)
Is visible.
Has no owner.
Has no parent.
Is not APPWIN.
Is not a toolwindow.
Is not a cloaked store window.
Class is ApplicationFrameWindow
Could anyone give me an answer on how to identify the Edge window (other than by using its name as a special case in the code) as distinct from the Skype window? Or maybe point me to a web article that I haven't seen yet? (I have looked at a dozen or so, without success.) Thank you.
Thank you everyone for your help. I ended up using the window titles because I found that there were several windows on my list that did not show up in the normal Alt-TAB display. Special cases were always required (on the net examples) to remove them from the list to help match the normal Alt-TAB display. Once I accepted the need for special cases, then using the title was the easiest way for these two windows.
I also learned that Microsoft Edge (and probably other apps too) start-up some background processes and windows even if you are not using them. Someone on the net said that you could disable these background processes in Settings, so I did that to get rid of some unwanted windows on my Alt-TAB (or nearly Alt-TAB) list.
I am currently researching how to spot windows (like Edge and Settings) that have IS_VISIBLE windows (that you can't see, but that have all the attributes mentioned earlier in the original question) attached to background processes that don't show up in the Apps list in the Task Manager.
Very strange. The OS obviously knows how to spot those windows and keep them out of the Task Manager Apps list and the Alt-TAB display. I wish I knew how to do it. Maybe the answer lies with processes, as Rita said earlier (but I didn't see any example of that method in my net research). Even Raymond Chen's famous method of walking ancestors does not produce the right answer that matches the Alt-TAB display.

Prevent grouping of taskbar icons for an application

I wonder: Is there some way of programmatically preventing the Windows 7+ taskbar from grouping an application's icons on a taskbar when multiple instances get started? I am happy with the grouping as it is, except that in one specific application of my own design I would prefer ungroupped icons.
When I came across SetCurrentProcessExplicitAppUserModelID, I was sure that was the answer - I would simply generate a new random string for each instance and that would get me a new taskbar icon. Unfortunately, it doesn't seem to work that way - even though I set a different AppUserModelID for each instance, they still get all groupped under the same taskbar icon. I would almost suspect that I got it wrong and AppUserModelID can only be used to group "unrelated" applications but not ungroup the related ones, but this article seems to indicate that my use case should work just fine.
About the only other cause of my problems which seems reasonable is the function's documentation's remark "This method must be called during an application's initial startup routine before the application presents any UI or makes any manipulation of its Jump Lists.", but as far as I can tell, I am adhering to the condition. Unless SetCurrentProcessExplicitAppUserModelID cannot be used with command-line applications because the taskbar icon gets created even before the application starts?

Programmatically lock a window in position in OSX

I'd like to be able to have an application permanently positioned in a specific place, and prevent other windows from overlapping it.
In Windows, this would be called an Application Desktop Toolbar (see https://msdn.microsoft.com/en-us/library/windows/desktop/cc144177%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396)
I have never seen an app with this in OSX (although I have only been using it full-time for a year), so perhaps this is not possible (/allowed).
If this is possible, how would I go about this?
To make window not movable:
NSApp.mainWindow.movable = NO;
And to make it over other windows:
NSApp.mainWindow.level = NSScreenSaverWindowLevel;

How to make an Eiffel Vision2 window always on top?

I created a little Vision2 window with an animation in it.
In my Windows 7 environment, I want this animation to be always visible on top all other windows on my desktop. I'm able to periodically call raise to bring the Vision2-window in front - but I lose focus of my selected window doing that.
To boil it down:
Q1: Is it even possible to keep a window "always on top" all other windows with Vision2 ?
Q2: Is it possible to do it with Eiffel WEL (and Windows 7) ?
Talking about Windows in general, it is not possible to guarantee that a window will be on top of all other windows, because if you have 2 windows that have this property, one of them will be on top of the other. As you will see in the post below, you have 2 categories of windows and z-order:
http://blogs.msdn.com/b/oldnewthing/archive/2005/11/21/495246.aspx
Assuming you are ok with something on top of all your windows, in WEL, you can use the Win32 API to achieve that by using WEL_WINDOW.set_z_order ({WEL_HWND_CONSTANTS}.hwnd_topmost).
In Vision, you can also do that by using EV_POPUP_WINDOW and calling `disconnect_from_window_manager' on it.

Resources