> El 2 may. 2022, a las 05:01, Ian MacArthur <
imaca...@gmail.com> escribió:
>
> On Sunday, 1 May 2022 at 09:56:58 UTC+1 Gonzalo wrote:
> I have the following function to keep the window as the topmost window
> for X11 and Windows:
>
> By "topmost" you mean a window, like a splash screen, that stays on top of every other window, from any application that has windows on the screen?
Yes. That’s exactly what I mean. The window should remain on top of all other application windows.
>
> void MainWindow::always_on_top( bool t )
> {
> #if defined(_WIN32) || defined(_WIN64)
> HWND action;
> if ( t ) action = HWND_TOPMOST;
> else action = HWND_NOTOPMOST;
> // Microsoft (R) Windows(TM)
> SetWindowPos(fl_xid(this), action, 0, 0, 0, 0, SWP_NOMOVE |
> SWP_NOSIZE );
>
> Juts out of an abundance of caution - but is this valid? I have a vague (therefore almost certainly wrong) feeling that the "action" had to be ORd with any existing action states... or something... Dunno...
Yes, it is valid (and it works). “Action” most definitively does not support OR.
>
> If not... need to ask Manolo or Matt I suspect!
>
Yes, I’ll need their help. I believe I need to write in Obj-C:
[window setlevel:NSFloatingWindowLevel]
However, I am unsure how do you hook that code into C++, without modifying Fl_cocoa.mm itself.
—
Gonzalo Garramuno
ggar...@gmail.com