3

I'd like to make a window stay on top of every other window (even if that other window is full-screen, has focus, and belongs to another parent). In my use case these windows are a full-screen presentation and a webcam window (to be recorded in a screencast). I think the best option is to make it a override-redirect window to force the window manager to leave it alone.

However, I don't want to change the source code of the program creating the window but use some command line tool like xprop to do so. How do I do that?

I tried things like the following to no avail.

# xprop -id 0x5c00001 -set override-redirect 1
xprop: error: unsupported conversion for override-redirect
1
  • As a work around I am currently recording just in windowed mode, maximizing would in theory work too, yes. However, there are severe downsides such as visible UI elements, different application behavior between fullscreen and windowed as well as clumsy recording settings. What I want is certainly possible: for example mate-display-properties add a small window on top of everything to label each monitor (and it has the override directive set thus I think this would be a simple solution if it can be done w/o changing the source code).
    – stefanct
    Sep 16, 2021 at 14:16

1 Answer 1

2

You can use xdotool first set the override_redirect flag

xdotool set_window --overrideredirect 1 0x5c00001

Then unmap and map window so that the window manager notices.

xdotool windowunmap 0x5c00001
xdotool windowmap 0x5c00001

The window may not not grab keyboard input only mouse. To set it back to the control of the window manager:

xdotool set_window --overrideredirect 0 0x5c00001
xdotool windowunmap 0x5c00001
xdotool windowmap 0x5c00001

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .