You are not logged in.

#1 2016-09-25 10:41:23

ought
Member
Registered: 2016-06-04
Posts: 24

Application for cutting part of window and making it overlay

Hello!
Once i saw one ArchLinux user making tricks with cutting part of window and transforming it into another window. For example, he cut part of browser with YouTube/Twitch and put it as overlay in top-right corner of the screen, so he could watch videos while working or chatting. Or he cut part of game window to watch when some task will finish.
Unfortunally, I cannot ask him about way to make this tricks myself.  And Google is silent about it.

So, could anyone help me to make this trick? =-)

Offline

#2 2016-09-25 14:39:14

seth
Member
Registered: 2012-09-03
Posts: 51,165

Re: Application for cutting part of window and making it overlay

Might be a compiz plugin.
Generally, only a compositor is able to do such.

Online

#3 2016-09-25 14:42:23

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,525
Website

Re: Application for cutting part of window and making it overlay

Agreed with the above - except for the word "generally".  In the absence of a compositor, the content of a window that is not visible on screen is never drawn anywhere so there is nowhere to retrieve it from.  This absolutely requires a compositor.  Once a compositor is running it is actually quite trivial within the compositor code - but I don't know of any compositors that provide an easy to access interface for this without writing code.  Of course this is likely due to my lack of experience with modern compistors.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#4 2016-09-26 07:31:25

seth
Member
Registered: 2012-09-03
Posts: 51,165

Re: Application for cutting part of window and making it overlay

Hey, I'm not a native english speaker - say: "in general" ;-)

Although redirecting a drawable does not mandate a "compositor" - it's eg. possible to redirect a single window and map it into two others. But that's a rather theoretic constellation.

Online

#5 2016-09-26 12:09:42

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,525
Website

Re: Application for cutting part of window and making it overlay

I agree.  But I didn't say that.  There are a lot of cool things that can be done with just Xlib with GetImage and PutImage functions and similar.  But they all require that the source window be visible on the display.  This is why I said what I did: if a window is not visible on the display, using it as a source *does* absolutely require a compositor.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#6 2016-09-26 21:13:06

seth
Member
Registered: 2012-09-03
Posts: 51,165

Re: Application for cutting part of window and making it overlay

I'm not talking about XGetImage. You can redirect specific clients and paint the named pixmap of the redirected window anywhere.
This of course requires the Composite and Damage extensions, but does not convey a common sense "compositor" (as in "compositing window manager" or xcompmgr which is just a very special, though very popular, usage of the composite extension)

This is eg. done by some systray implementations to blend the tray icon into the tray.

Online

#7 2016-09-27 03:27:17

mpan
Member
Registered: 2012-08-01
Posts: 1,207
Website

Re: Application for cutting part of window and making it overlay

Any window can be rendered on xfvb and image may be taken from there. I’ve used this solution successfully for various scrapers.

The problem is performance: unless powerful hardware is available, one can’t even imagine using this for displaying video. The same applies to any compositor-less method that relies on copying window contents as a bitmap. Also handling input is a mess.


Sometimes I seem a bit harsh — don’t get offended too easily!

Offline

Board footer

Powered by FluxBB