| [ Return to Bugs & Features | Post Text | Post File | Prev | Next ]
STR #1981
Application: | FLTK Library |
Status: | 5 - New |
Priority: | 1 - Request for Enhancement, e.g. asking for a feature |
Scope: | 3 - Applies to all machines and operating systems |
Subsystem: | Core Library |
Summary: | [PATCH] Add "stay on top"-feature to Fl_Window |
Version: | 1.4-feature |
Created By: | bip |
Assigned To: | Unassigned |
Fix Version: | Unassigned |
Update Notification: | |
Trouble Report Files:
[ Post File ]
Trouble Report Comments:
[ Post Text ]
|
| Hi,
Ian asked me to repost my patch as an STR. Here it is:
I've written a little patch which adds a stay_on_top method to the Fl_Window class. This allows you to set a window above all other windows that are visible on the screen. If I see it correctly fltk is lacking such a feature.
To set the window on top call: win->stay_on_top(1); To set the window to normal behaviour call: win->stay_on_top(0);
I have to admit that I'm not very familiar with the fltk sources. So I hope this patch wont't break anything.
Would be great if you like the idea of adding the "stay on top"-feature to fltk.
Regards, Daniel | |
|
#2 | greg.ercolano 03:30 May 09, 2011 |
| Docs should probably reflect if this code is sensitive to when it can be executed. (ie. before/after show() is called, before/after the xid is created, etc)
Also, I /think/ the OSX equivalent would be -setLevel() [in Cocoa].
Not sure about X11. | |
|
#3 | ianmacarthur 03:42 May 09, 2011 |
| Also, note that, despite it being my suggestion that the OP post his patch here, I'm not really in favour of this as a facility.
Permanently on-top-of-everything windows are seldom a Good Thing in UI design terms, AFAIK, and are often only useful for splashcreens or other such pointless clutter.
Generally, if you need an on-top window, then adjusting the modality of the window as regards your own app is often enough, and less annoying to the user than being on-top of *all* apps...
For X11 this touches on the whole "transient" and "transient-for" and all that, I guess, too, FWIW... | |
|
#4 | greg.ercolano 08:57 May 09, 2011 |
| I get asked for this feature a lot for my nixieclock application.
I don't personally like it either, at least not as a default. (eg. "Task Manager" always drives me bananas wanting to be a top window)
But, FLTK really should provide whatever features it can to allow app programmers avoid platform specific code.
Granted most of the time this feature is probably more abused, than properly used, but for the times it's valid, it really should be supported. | |
|
#5 | djcj 03:14 Feb 06, 2018 |
| Please implement this in FLTK. I know that many apps (mostly on Windows) abuse this feature, but there a good use cases, i.e. if you want to write your own notification popup, similar to what libnotify does. | |
[ Return to Bugs & Features | Post Text | Post File ]
|
| |