[GAVE UP] Is it possible to place a window on top of fullscreen?

Forum rules
Before you post please read how to get help
Boris_the_Bobcat
Level 1
Level 1
Posts: 36
Joined: Tue Aug 09, 2016 10:08 am

[GAVE UP] Is it possible to place a window on top of fullscreen?

Post by Boris_the_Bobcat »

Is it possible to place any application window on top of some application that is in fullscreen mode? Did some small research on this, but found only this unanswered thread:

https://stackoverflow.com/questions/419 ... fullscreen

I would want exactly the same, more precisely a clock showing on top of Firefox on fullscreen mode.
The closest I have got is the same than on referred thread:

Code: Select all

:~$ xclock -digital -brief &
:~$ wmctrl -r "xclock" -b toggle,above
This makes the xclock window to stay above others, except fullscreen. If I open Firefox and hit F11, it will be covered.

Am using LM Xfce 19.3.
Last edited by Boris_the_Bobcat on Sun Jun 14, 2020 10:06 am, edited 1 time in total.
Boris_the_Bobcat
Level 1
Level 1
Posts: 36
Joined: Tue Aug 09, 2016 10:08 am

Re: Is it possible to place a window on top of fullscreen?

Post by Boris_the_Bobcat »

Well, found some sort of workaround by using notifications.

Code: Select all

#!/bin/bash
# notify-test.sh

MSG_TOPIC="Current time"
TIME=$(date '+%H:%M:%S')
MSG_BODY="<span font='26px'><b>${TIME}</b></span>"
APP_NAME="Notification test"
EXP_TIME="60810" # 60820 is too high for once in a minute executed cron job

# Send a notification message with current time
notify-send \
	--urgency=normal \
        --expire-time=${EXP_TIME} \
	--app-name="${APP_NAME}" \
	--category=transfer \
	"${MSG_TOPIC}" \
	"${MSG_BODY}"

exit 0
Set to user crontab to be executed every minute.

Code: Select all

# m h  dom mon dow   command
* *  * * *         env DISPLAY=:0 /usr/local/bin/notify-test.sh
Would still prefer window -based solution if it only is possible.
User avatar
all41
Level 16
Level 16
Posts: 6249
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Is it possible to place a window on top of fullscreen?

Post by all41 »

Maybe a Firefox add-on clock would work out for you--there are several.
Also if you use Compiz window manager you can set a Window Rule to keep a window (such as a desktop clock) on top
and this will work for fullscreen FF
Linux Crux=Aut Viam Inveniam Aut Faciam+libera ab tyrannis
secureIT
Level 4
Level 4
Posts: 264
Joined: Wed Dec 05, 2018 1:26 pm

Re: Is it possible to place a window on top of fullscreen?

Post by secureIT »

There is no "on-top" function in xfce, but you can achieve what you want with a few easy steps :

First of all wmctrl must be installed.

So if it is not installed in your system .... just install it :

Code: Select all

apt install wmctrl
After that do a restart of the system.

The command for pinning a window on top will be :

Code: Select all

wmctrl -r :SELECT: -b add,above
Open up the preferences of your Keyboard an select a new shortcut.

As command use the above and as key select Super+T e.g. (whatever you want)

Close the Keyboard Preferences.

So now you have a keyboard shortcut to pin every window you want to - "on top".

Open up the Window that should stay on top.
Then press your keyboard shortcut.
After that your cursor will look like a cross.
Place the cross on title bar of the window you want to stay on top and klick.

Now you can open your browser - or whatever in fullscreen mode ..... and the app you marked before will stay on top of it .... until you close it.
.
User avatar
MrEen
Level 20
Level 20
Posts: 11756
Joined: Mon Jun 12, 2017 8:39 pm

Re: Is it possible to place a window on top of fullscreen?

Post by MrEen »

secureIT wrote:
Thu Jun 04, 2020 11:59 am
There is no "on-top" function in xfce,
There is on mine. Right click on the title bar, select Always on Top. However, it doesn't work as the OP wanted, i.e. not over Fullscreen windows. The rest of your post is indeed very helpful!
secureIT
Level 4
Level 4
Posts: 264
Joined: Wed Dec 05, 2018 1:26 pm

Re: Is it possible to place a window on top of fullscreen?

Post by secureIT »

Yes MrEen,you are right !
Sorry, but i did not realize the on on top-function by using a right-click on window-title-bar.
Tried it with some apps and it worked flawlessly.
It works for me also with an app above a full screen browser.
So may be the right click on the window-title bar may work as the OP wanted.
Otherwise he has now also another way to do it by use of a keyboard-shortcut .......
.
Boris_the_Bobcat
Level 1
Level 1
Posts: 36
Joined: Tue Aug 09, 2016 10:08 am

Re: Is it possible to place a window on top of fullscreen?

Post by Boris_the_Bobcat »

all41 wrote:
Wed Jun 03, 2020 9:55 am
Maybe a Firefox add-on clock would work out for you--there are several.
Also if you use Compiz window manager you can set a Window Rule to keep a window (such as a desktop clock) on top
and this will work for fullscreen FF
Thanks for the tip on FF extensions and Compiz wnidow manager, I might give them a try. I am not currently using Compiz actively on anything. Is it possible to define certain application that, if it will be opened, will stay on top automatically without having to be selected or defined manually every time?
secureIT wrote:
Fri Jun 05, 2020 3:25 pm
So may be the right click on the window-title bar may work as the OP wanted.
Otherwise he has now also another way to do it by use of a keyboard-shortcut .......
I have tried both right clicking on the window-tiltle bar as well as using the keyboard shortcut and wmctrl command you provided. Unfortunately, for me, FF fullscreen is still covering them all. Have tried it with few applications (xclock, Thunderbird, Libreoffice). I wonder why it seems to work for you but not for me. What version of LM are you using?

In case any of the following information could be useful

Code: Select all

$ hostnamectl
   Static hostname: xxx
         Icon name: computer-desktop
           Chassis: desktop
        Machine ID: xxx
           Boot ID: xxx
  Operating System: Linux Mint 19.3
            Kernel: Linux 5.3.0-53-generic
      Architecture: x86-64
 

Code: Select all

$ inxi -F | grep Desktop
  Host: xxx Kernel: 5.3.0-53-generic x86_64 bits: 64 Desktop: Xfce 4.14.1 
  Type: Desktop Mobo: ASRock model: B150M Pro4 serial: <root required>
 

Code: Select all

$ lspci -v

...

00:02.0 VGA compatible controller: Intel Corporation HD Graphics 530 (rev 06) (prog-if 00 [VGA controller])
	Subsystem: ASRock Incorporation HD Graphics 530
	Flags: bus master, fast devsel, latency 0, IRQ 127
	Memory at de000000 (64-bit, non-prefetchable) [size=16M]
	Memory at c0000000 (64-bit, prefetchable) [size=256M]
	I/O ports at f000 [size=64]
	[virtual] Expansion ROM at 000c0000 [disabled] [size=128K]
	Capabilities: <access denied>
	Kernel driver in use: i915
	Kernel modules: i915
secureIT
Level 4
Level 4
Posts: 264
Joined: Wed Dec 05, 2018 1:26 pm

Re: Is it possible to place a window on top of fullscreen?

Post by secureIT »

Hi Boris_the_Bobcat

i am on LM 19.3 Xfce .

So i gave it a try like you with thunderbird and libre office ... and it worked.

By the way : for the Keyboard-Shortcut-Version my example Super+T will not work .... better will be: ALT+T

In order for it to work as you want, it is important that you follow the order in which the applications are opened.

You should first open the application that you want to stay "on top" and give it the right-click on the window-title bar selecting "stay on top " (or by using the keyboard shortcut)
- and only afterwards open the browser in full screen mode.
.
User avatar
all41
Level 16
Level 16
Posts: 6249
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Is it possible to place a window on top of fullscreen?

Post by all41 »

Boris_the_Bobcat wrote:
Sat Jun 06, 2020 9:23 am
all41 wrote:
Wed Jun 03, 2020 9:55 am
Maybe a Firefox add-on clock would work out for you--there are several.
Also if you use Compiz window manager you can set a Window Rule to keep a window (such as a desktop clock) on top
and this will work for fullscreen FF
Thanks for the tip on FF extensions and Compiz wnidow manager, I might give them a try. I am not currently using Compiz actively on anything. Is it possible to define certain application that, if it will be opened, will stay on top automatically without having to be selected or defined manually every time?
Yes Compiz Window Rules has a setting for that. Compiz is somewhat resource intensive though.
In Compiz Settings scroll down to Window Management and enable Window Rules. The third setting field is 'Above'.
Click the associated + button. When the dialogue opens click Grab, and then click the window you want to always be on top (in your case the clock)
Give it a go, and you can always revert back to your current manager if it doesn't get along with your system.
Linux Crux=Aut Viam Inveniam Aut Faciam+libera ab tyrannis
Boris_the_Bobcat
Level 1
Level 1
Posts: 36
Joined: Tue Aug 09, 2016 10:08 am

Re: Is it possible to place a window on top of fullscreen?

Post by Boris_the_Bobcat »

secureIT wrote:
Sat Jun 06, 2020 4:00 pm
In order for it to work as you want, it is important that you follow the order in which the applications are opened.

You should first open the application that you want to stay "on top" and give it the right-click on the window-title bar selecting "stay on top " (or by using the keyboard shortcut)
- and only afterwards open the browser in full screen mode.
I tried to open apps specifically on this order, but it didn't make any difference.
all41 wrote:
Sat Jun 06, 2020 8:56 pm
Yes Compiz Window Rules has a setting for that. Compiz is somewhat resource intensive though.
In Compiz Settings scroll down to Window Management and enable Window Rules. The third setting field is 'Above'.
Click the associated + button. When the dialogue opens click Grab, and then click the window you want to always be on top (in your case the clock)
I did this, but unfortunately it has no desired effect on my system. Window Rules was enabled in my system already, although there were no any rules there.

This sounds weird. I went through some of the settings I have changed since the installation of LM 19.3, but couldn't find anything I could imagine having any effect on this. The only settings having anything to do with window behaving are

Code: Select all

# Theme and Icons
Menu -> Settings -> Appearance -> Style -> Mint-X
Menu -> Settings -> Appearance -> Icons -> Mint-X

# Disable automatic window maximizing in Xfce
Menu -> Settings -> Window Manager Tweaks -> Accessibility -> [ ] Automatically tile windows when moving towards screen edge.

# Disable workspaces
Menu -> Settings -> Workspaces -> General -> Number of workspaces: 1
I think this starts to get a bit too complicated just to show a simple digital clock. I might just live with my slightly clumsy notification -based clock that does the job for now.
secureIT
Level 4
Level 4
Posts: 264
Joined: Wed Dec 05, 2018 1:26 pm

Re: Is it possible to place a window on top of fullscreen?

Post by secureIT »

I tried now also xclock ...... and it worked on top of browser that is in fullscreen-mode.

What are your desktop settings like? are you on Xfwm4 ?

my settings:

Desktop settings > Window management > Xfwm4 + composite

edit :
see vids , of things working :

1. xclock -on-top with right-click
https://streamable.com/ky28jt

2.xclock - on-top-with keyboard-shortcut
https://streamable.com/fwsc4h
.
Boris_the_Bobcat
Level 1
Level 1
Posts: 36
Joined: Tue Aug 09, 2016 10:08 am

Re: Is it possible to place a window on top of fullscreen?

Post by Boris_the_Bobcat »

secureIT wrote:
Sun Jun 07, 2020 11:35 am
I tried now also xclock ...... and it worked on top of browser that is in fullscreen-mode.
Based on the videos you sent, your Firefox is not in fullscreen mode, instead, it is just maximized. To enter into fullscreen mode you should press F11 when having a focus on FF window, or alternatively go to View -> Full Screen. I wonder if this is the case with @all41 too. All the previous things have worked for me too on maximized FF window, but not in full screen.
secureIT wrote:
Sun Jun 07, 2020 11:35 am
What are your desktop settings like? are you on Xfwm4 ?
Menu > Settings > Desktop Settings > Window Manager: Xfwm4 + Compositing
User avatar
all41
Level 16
Level 16
Posts: 6249
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Is it possible to place a window on top of fullscreen?

Post by all41 »

Boris_the_Bobcat wrote:
Mon Jun 08, 2020 5:12 am
secureIT wrote:
Sun Jun 07, 2020 11:35 am
I tried now also xclock ...... and it worked on top of browser that is in fullscreen-mode.
Based on the videos you sent, your Firefox is not in fullscreen mode, instead, it is just maximized. To enter into fullscreen mode you should press F11 when having a focus on FF window, or alternatively go to View -> Full Screen. I wonder if this is the case with @all41 too. All the previous things have worked for me too on maximized FF window, but not in full screen.
secureIT wrote:
Sun Jun 07, 2020 11:35 am
What are your desktop settings like? are you on Xfwm4 ?
Menu > Settings > Desktop Settings > Window Manager: Xfwm4 + Compositing
No, I tested the full screen mode, not just maximized---with both compiz window rule and ff clock extension. Both visible.
Linux Crux=Aut Viam Inveniam Aut Faciam+libera ab tyrannis
secureIT
Level 4
Level 4
Posts: 264
Joined: Wed Dec 05, 2018 1:26 pm

Re: Is it possible to place a window on top of fullscreen?

Post by secureIT »

Blame on me :x : Yes i tested with just maximized browser.

But see this vid ... xclock on browser in real fullscreen-mode

https://streamable.com/c5nj19

tried it by using this two commands

for browser:

Code: Select all

wmctrl -r :SELECT: -b add,below
and for xclock:

Code: Select all

wmctrl -r :SELECT: -b add,above

But I have to tell you that it is not yet a definitive solution.

Unfortunately, xclock disappears when I scroll in full screen

I am working on it .....
.
secureIT
Level 4
Level 4
Posts: 264
Joined: Wed Dec 05, 2018 1:26 pm

Re: Is it possible to place a window on top of fullscreen?

Post by secureIT »

Is it possible to place a window on top of fullscreen?

Spended some time on scripting, and came to the conclusion, that in general it is not possible with our DE in the "normal way" by using preferences - or "simple" scripts, as "fullscreen" is the highest stack.

Even if it could be done with wmctrl and the commands ... "above" and ... "below" , the app on the top will loose its focus, when one will do a scroll in the fullscreen-app.

May be compiz will do the job by disregarding the recommendation by freedesktop.org. by influence of the stacking-order of the window-manager,
but i will not try it again, as compiz in the past had done a mess with my other screenlets on desktop.
So i hope, @ all41 will it refine exactly with an example , how he achieved it.

https://specifications.freedesktop.org/ ... CKINGORDER

Stacking order

To obtain good interoperability between different Desktop Environments, the following layered stacking order is recommended, from the bottom:

windows of type _NET_WM_TYPE_DESKTOP

windows having state _NET_WM_STATE_BELOW

windows not belonging in any other layer

windows of type _NET_WM_TYPE_DOCK (unless they have state _NET_WM_TYPE_BELOW) and windows having state _NET_WM_STATE_ABOVE

focused windows having state _NET_WM_STATE_FULLSCREEN

Windows that are transient for another window should be kept above this window.

The window manager may choose to put some windows in different stacking positions, for example to allow the user to bring currently a active window to the top and return it back when the window looses focus.

By searching the net, i found also osdclock.

They said it should be a floating clock-app ......

I tried it, but did not show anything under LM 19 (Ubuntu 18.04) (may be a bug in this app ?)


Last thing i tried is "notifications" .....

As the notifications stay also on top of fullscreen, that might be a solution in your case.

Script from another forum ......
open in terminal :

Code: Select all

while true; do notify-send `date +%H:%M` -t 60000; sleep 60; done;
This will show you the time as a notification - and refreshes every minute.

After that open browser in fullscreen-mode

The time-now-notification will stay on top of fullscreen, even if you scroll down .......

If that is a solution for you, i can tell you, how to save the command as a script - and append it to a clickable button .

That's all for now ...... good luck
.
User avatar
all41
Level 16
Level 16
Posts: 6249
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Is it possible to place a window on top of fullscreen?

Post by all41 »

secureIT wrote:
Tue Jun 09, 2020 2:18 pm
Is it possible to place a window on top of fullscreen?

Spended some time on scripting, and came to the conclusion, that in general it is not possible with our DE in the "normal way" by using preferences - or "simple" scripts, as "fullscreen" is the highest stack.

Even if it could be done with wmctrl and the commands ... "above" and ... "below" , the app on the top will loose its focus, when one will do a scroll in the fullscreen-app.

May be compiz will do the job by disregarding the recommendation by freedesktop.org. by influence of the stacking-order of the window-manager,
but i will not try it again, as compiz in the past had done a mess with my other screenlets on desktop.
So i hope, @ all41 will it refine exactly with an example , how he achieved it.
I use Compiz mostly for windows placement, not the effects. It's easy to implement a Window Rule.
Open Compiz settings from the menu, scroll to the bottom and put a check mark for Window Rules. Then click the Window Rules icon.
In the opened window click the + after the field for 'Above', press the 'Grab' button--the cursor turns into a crosshair. Move the crosshair to
an open window, folder, app such as clock, etc. and click. That window will be above EVERY window
Linux Crux=Aut Viam Inveniam Aut Faciam+libera ab tyrannis
Boris_the_Bobcat
Level 1
Level 1
Posts: 36
Joined: Tue Aug 09, 2016 10:08 am

Re: Is it possible to place a window on top of fullscreen?

Post by Boris_the_Bobcat »

For a start, I tested out of curiosity if something would work on my spare laptop HP 6730b which has LM Xfce 19.3 installed too. I tried only to toggle "Always on Top" from window title, but it did not stay on top of FF fullscreen. Have installed both OS from same linuxmint-19.3-xfce-64bit.iso.
all41 wrote:
Mon Jun 08, 2020 9:30 am
No, I tested the full screen mode, not just maximized---with both compiz window rule and ff clock extension. Both visible.
Hmm. Too bad that it does not seem to work similarly for me.

I did some research and testing on FF extensions, and there are couple which are doing the job a bit similarly than a floating window would:

https://addons.mozilla.org/en-GB/firefo ... ini_clock/
https://addons.mozilla.org/en-GB/firefo ... foxclocks/

Mini Clock shows time in certain corner of the screen, on top of website content. Have to disable the extension though to get it removed. Foxclock will show time in status bar.
secureIT wrote:
Tue Jun 09, 2020 2:18 pm
As the notifications stay also on top of fullscreen, that might be a solution in your case.

Script from another forum ......
open in terminal :

Code: Select all

while true; do notify-send `date +%H:%M` -t 60000; sleep 60; done;
This will show you the time as a notification - and refreshes every minute.
This seems to work similarly than my notification clock I showed in earlier post. Using some sort of loop structure is more sophisticated and useful in a sense that it needs only one action to start, and does not have to be executed every minute in cron. I might modify my script a bit towards that.
secureIT
Level 4
Level 4
Posts: 264
Joined: Wed Dec 05, 2018 1:26 pm

Re: Is it possible to place a window on top of fullscreen?

Post by secureIT »

I think i got now a Solution for your needs (without compiz) :

1. Create a keboard-shortcut with the command :

Code: Select all

xfdesktop --windowlist
and append it to Alt+W ....... (or whatever you want)

2. open up xclock

Do a right mouseclick on window-title and choose "always on top"

3. open up firefox in fullsceen mode.

Now xclock will disappear.

Use the keyboard-shortcut (see above)

In the upcoming window choose xclock.

Now xclock shows up on top of the firefox fullscreen-window.

And it will stay there ..... even if you scroll- or do other things in that screen :D

edit:

Tested with firefox in fullscreen-mode and waterfox in fullscreen-mode

See vid showing ...... it works !

https://streamable.com/jfew28

edit1 :

For those who are interested to try it out :

xclock should be already installed on your system - so you dont need to install it.

For start of xclock i created also a keyboard-shortcut with command :

Code: Select all

xclock -digital -update 1
and bound it to ALT+C

edit 2 :

Even if there exists now a solution for xclock, i noticed, that this solution is not applicable to other apps that are waiting for user input in graphical mode.

Dont try to do it with vlc, xplayer, libreoffice e.g ...... it will not work !

So let me refine my answer, i gave in a post before :

In general it is impossible, to achieve it by using the "normal" preferences, but it seems, that there are exceptions on setting focus on windows.

(may be under use of compiz possible ? - i dont know ! ...and will not try it)

It is actually logical because the browser itself is waiting for user input.
So if I open an app that stays on top of the browser and is waiting for user input, and the
browser (in fullscreen-mode) is also waiting for user input, a click into the browser window will set the focus to its window, and move the application, that is on top of it into the background of the workspace .

One of the exceptions is xclock, which is based on x11-apps, while it runs in its own window, and doesnt wait for user input.

I will have a look at its sourcecode to get more information about the fact, that it works on top of browser, which is in fullscreen-mode, by use of xfdesktop-command.
.
secureIT
Level 4
Level 4
Posts: 264
Joined: Wed Dec 05, 2018 1:26 pm

Re: Is it possible to place a window on top of fullscreen?

Post by secureIT »

It seems to me. that i am now alone on this thread ? :?

to go on, it would be very helpful if someone who tried my solution would give a feedback, whether it worked on their system too.
.
Boris_the_Bobcat
Level 1
Level 1
Posts: 36
Joined: Tue Aug 09, 2016 10:08 am

Re: Is it possible to place a window on top of fullscreen?

Post by Boris_the_Bobcat »

Tried the Mini Clock FF extension

https://addons.mozilla.org/en-GB/firefo ... ini_clock/

but unfortunately it resets it's settings on each FF restart. It also asks some privileges I think it doesn't need for it's basic function.

Thank you for your assistance @secureIT and @all41. As per now, I am officially giving up on the issue and will continue using the notification -based clock described in earlier post.
Post Reply

Return to “Xfce”