As you can see, the menu correctly renders over the child window - on Linux. But on Windows, it doesn't: it's obscured by the child window.
On Tue, 25 Mar 2025, 17:57 Caspian Merlin wrote:.
As you can see, the menu correctly renders over the child window - on Linux. But on Windows, it doesn't: it's obscured by the child window.
See where? Did you intend to post a screenshot or some code?I don't seem to have either.

On 3/25/25 11:42, imm wrote:
On Tue, 25 Mar 2025, 17:57 Caspian Merlin wrote:.
As you can see, the menu correctly renders over the child window - on Linux. But on Windows, it doesn't: it's obscured by the child window.
See where? Did you intend to post a screenshot or some code?I don't seem to have either.
Hmm, the screenshot shows up in the mailing list (in
Thunderbird anywayh) as an inline image,
but it's not showing up on the web interface for google groups
or on fltk's web interface.
I think the web interfaces to the group only support
attachments, or inline images arranged
as attachments. But inlines done with <img
src="data:image..raw_image_data"> is apparently
not supported.

On Mar 25, 2025, at 12:07 PM, Caspian Merlin <cas...@merlins.online> wrote:
Sorry - I pasted an image into the inital message, but it appears when it was submitted this wasn't preserved. I'll try attaching it instead.Yes, I'm using Mo's Rust wrapper.The main application window consists of a MenuBar at the top, to be used as a window menu, and a GLWindow that occupies the rest of the window.Some of the menu items cause smaller, child windows to open. I want those windows to display on top of the main window even if the main window has the focus.If a child window is newr the top of the main window and you click one of the items on the main window's MenuBar, the drop-down menu may overlap with the child window. The behaviour I want is that the menu draws over the entire child window - including the OS / Window Manager-specific title bar etc. This happens by default on my Linux box (KDE Plasma), but not on Windows 11. On Windows, the menu draws underneath the child window because the child window is on top of everything. However, programs that use the Win32 API to draw menu bars *do* render the menus on top of any other windows, even if those windows are on top of the window from which the menu is being drawn.The attached screenshot is on Linux, KDE Plasma, which shows the intended behaviour. On Windows, the menu draws underneath the child window.
<Screenshot_20250325_190318-1.png>On Tuesday, March 25, 2025 at 6:50:07 PM UTC Ian MacArthur wrote:Ah, hold on: are you using Mo's Rust wrappers?That might make more sense - be useful to have mentioned this was Rust (assuming that it is, of course!)Even then, it'd still be better to describe what you want to achieve, because the effects you describe in the OP don't really clarify it for me.--
Ian
From my Fairphone FP3
On Tue, 25 Mar 2025, 18:42 imm, <imaca...@gmail.com> wrote:On Tue, 25 Mar 2025, 17:57 Caspian Merlin wrote:.As you can see, the menu correctly renders over the child window - on Linux. But on Windows, it doesn't: it's obscured by the child window.See where? Did you intend to post a screenshot or some code?I don't seem to have either.Anyway, as Albrecht said, the method you described doesn't match any FLTK one.What effect are you actually intending to achieve?Perhaps we can determine the "FLTK way" to attain the desired result?If you can describe what it is you want to do, we can certainly suggest some ways to try, but what you have outlined so far doesn't really help us to help you!
--
Ian
From my Fairphone FP3
--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/fltkgeneral/f87942ba-2179-47df-b47a-c81e2ad66c12n%40googlegroups.com.
<Screenshot_20250325_190318-1.png><Screenshot_20250325_190318-1.png>
If the "child" windows have title bars and border decorations drawn by the WM, then they are fully windows in their own right, and there's no circumstance in which it makes sense for them to appear over another window, but underneath that window's menu drop-down. Even if they are modal (or non-modal, I suppose) then I don't think I'd expect them to be drawn over the "main" window whilst being under the "main" window's menu... Just seems weird.

Is window modality what the Rust "on-top" function is setting? I don't know the Rust code - Mo?Mind you, the docs seem to suggest you apply the "on-top" after the window is shown, and I don't think you can change window modality whilst it's shown, can you?So maybe it's not modality at all but something else?
If the "child" windows are truly subwindows I'd not expect them to have any WM decorations at all, so I assume these can't be subwindows then.Do you want them to have WM decorations?
If the "child" windows have title bars and border decorations drawn by the WM, then they are fully windows in their own right, and there's no circumstance in which it makes sense for them to appear over another window, but underneath that window's menu drop-down. Even if they are modal (or non-modal, I suppose) then I don't think I'd expect them to be drawn over the "main" window whilst being under the "main" window's menu... Just seems weird.
Hmm, this is the behaviour I would expect.
Interesting -- whatever technique you used to inline the
image in THIS ^^ reply message, the image showed up inline in both
web interfaces to the forum just fine as an inline image. (It also
shows up when you followed up as an attachment)
So you can continue using that technique if you like.
I'm one of the forum admins and often handles back end issues;
if you can remember anything different about how you constructed
the inline image in your first message vs. the above message,
that'd help me. Perhaps a different application to post the
message? Or maybe a copy/paste vs. an 'Insert image'?
Trying to figure out the cause.
(Sometimes posting from the google forum interface is the
problem, whereas posting from email works fine)
I'm one of the forum admins and often handles back end issues; if you can remember anything different about how you constructed the inline image in your first message vs. the above message, that'd help me. Perhaps a different application to post the message? Or maybe a copy/paste vs. an 'Insert image'?
Trying to figure out the cause.
(Sometimes posting from the google forum interface is the problem, whereas posting from email works fine)
Content-Type: multipart/alternative; boundary="------------6L33PCj0LtaAihZn9ZKZWe1j" Message-ID: <cf6fe68d-624a-42eb...@aljus.de> Date: Tue, 25 Mar 2025 20:08:13 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [fltk.general] Menu - render over child window```
This is a multi-part message in MIME format.
--------------6L33PCj0LtaAihZn9ZKZWe1j
Content-Type: text/plain; charset="UTF-8"; format=flowed
On 3/25/25 19:42 imm wrote:
> On Tue, 25 Mar 2025, 17:57 Caspian Merlin wrote:.
>
> As you can see, the menu correctly renders over the child window -
> on Linux. But on Windows, it doesn't: it's obscured by the child
> window.
>
>
> See where? Did you intend to post a screenshot or some code?
> I don't seem to have either.
I got it, reposting for completeness. I hope you, Ian, get this one.
<< empty lines, no image here >>BTW, I checked the Google web interface and I don't see it there. Weird.
I got it, reposting for completeness. I hope you, Ian, get this one.<br=
>
<br>
<br>
<img src=3D"cid:part1.A9kRA...@aljus.de" alt=3D""><br>
<br>
<br>
BTW, I checked the Google web interface and I don't see it there.
Weird.<br>
<br>
```
Viewing my own message:
Ian, if you're using Thunderbird, can you please check these settings?
If not, what do you use to view the messages? Mail client, newsgroup, or anything else?@Caspian
Maybe you intended to call make_modal on the child window instead of set_on_top?
set_on_top() was added to fltk-rs because users wanted a way to really set the window to be on top of everything else.
So from your issue, it seems it's working correctly on windows!


If the "child" windows have title bars and border decorations drawn by the WM, then they are fully windows in their own right, and there's no circumstance in which it makes sense for them to appear over another window, but underneath that window's menu drop-down. Even if they are modal (or non-modal, I suppose) then I don't think I'd expect them to be drawn over the "main" window whilst being under the "main" window's menu... Just seems weird.
Hmm, this is the behaviour I would expect. Imagine you've popped out a panel or toolbar in an IDE or office program - it often does become a top-level OS window, complete with titlebar and decorations. It's set always to be on top of the main window (otherwise it would disappear behind it as soon as you interact with the main window). Equally, if you select the 'File' menu of the main window, it'd be annoying if the menu drew underneath the widget you'd popped out. ...
All these window types are separate OS windows.
Type 1 is, as the name suggests, completely independent, like a
window of another program. It can be occluded by (all) other
windows of the same application.
Type 2 and 3 are related to their "parent" [2] window (the main window or any other window of the application) and stay always on top of that window.
Modal windows (type 2) also grab all input (keyboard and mouse clicks) directed to their "parent" windows, whereas non-modal (type 3) windows don't do that (you can interact with the "parent" window while the non-modal window is visible.
(Ian, please correct me if there's anything wrong with my explanation).[2] I used the term "parent" window (parent in "...") to mean the
relationship on the OS level, not in the FLTK 'Fl_Group::parent()' sense which means
the opposite of a subwindow. Sorry for the confusion.
Therefore the OP should look for implementing their way to show the "child" window (which is not a child window in the FLTK sense, as written above) as a modal or non-modal window instead. FLTK has ways to do this (but it must be done before showing the window, as Ian said). Whether fltk-rs can set a window modal or non-modal I can't tell, but maybe Mo can offer more insights.
I hope this helps.
Hi Mo,First off - fantastic work with fltk-rs and cfltk.I don't want it to be modal - I want several floating windows which always display above the main window, but I still want the user to be able to interact with the main window.


Ian, if you're using Thunderbird, can you please check these settings?If not, what do you use to view the messages? Mail client, newsgroup, or anything else?
I don't want it to be modal - I want several floating windows which always display above the main window, but I still want the user to be able to interact with the main window. A bit like an undocked toolbar in Office programs:
I think the terms "child window" and "subwindow" need some clarifications to avoid misunderstandings.
In "FLTK speech" a child window or subwindow is a window that is embedded in another window. Such a subwindow never has a border of its own, and it can't be moved around etc. by the user (WM). However, such FLTK subwindows are typically also their own OS windows, just being embedded in another window.
Other windows created by the main process usually have a border (unless explicitly disabled) and fall into three (four [1]) categories (Ian can maybe explain this better):
- Independent top level window
- Modal window
- Non-Modal window
All these window types are separate OS windows.
Type 1 is, as the name suggests, completely independent, like a window of another program. It can be occluded by (all) other windows of the same application.
Type 2 and 3 are related to their "parent" [2] window (the main window or any other window of the application) and stay always on top of that window.
Modal windows (type 2) also grab all input (keyboard and mouse clicks) directed to their "parent" windows, whereas non-modal (type 3) windows don't do that (you can interact with the "parent" window while the non-modal window is visible.
(Ian, please correct me if there's anything wrong with my explanation).
FWIW I cobbled together (on Windows) a quick check of this in C++ / fluid and it seemed to work, so assuming there is a Rust wrapper for setting the floating windows to be non-modal I think that's the answer.
Having posted this, it occurred to me it might actually be _useful_ to post my (allegedly working!) example. Here's the fluid file.