clone window try2

Carsten Haitzler (The Rasterman) raster at rasterman.com
Thu Jun 14 17:35:32 UTC 2018


On Thu, 14 Jun 2018 19:00:07 +0200 be ba <be3737ba-s at student.lu.se> said:

what you want could be done by a compositor or compositing window manager. in x
a window has only one geometry (size and position) and one place in the window
tree. that is not going to change. if you just wanted a "show multiple copies
of the window" but don't want to interact with all copies (click with mouse
etc.), then a compositing wm could easily do this just by drawing the same
window in multiple locations, since compositors "composite" the screen and do
the rendering/display rather than the xserver itself.

enlightenment does just this with it's pager for example (the pager for virtual
desktops shows a miniature of each desktop with all windows with content live
and updated in miniature). enlightenment is just making duplicate views of the
same windows in the pagers. it does the same for the task
switcher/launcher/dock in the menu and so on). so it is possible: 1 wm already
does it all day long. enlightenment doesn't have the exact feature you are
asking for here, but the infra is there to easily add it window by window,
desktop by desktop etc.

but back to xmonad, you'd need a compositing wm and i believe xmonad is not. a
separate compositor wouldn't work well as this would require integration to
know what virtual desktop os active, know when they change, which windows are
in each desktop and appropriately arrange window content and/or rendering
correctly (to make this work the wm can't unmap windows to switch desktops. to
keep the content from another desktop's windows still updating you do
tricks like not unmapping but just moving out of the way (via stacking or shape
extension input regions etc. to remove the input areas), and just stop drawing
those windows if they are not visible on the current desktop. xmonad won't be
doing that i would say as it's not a compositing wm.

so ... you either need to switch wm's, or make xmonad a compositing wm. you
should talk with the maintainers/authors of xmonad first to see if such patches
would ever be accepted before you begin, otherwise you will be taking on
forking of the project, so be prepared for that.

> Hi,
> 
> I think my first email got lost, because I didn't receive a copy from
> the mailing list:
> 
> I am using the tiling window manager xmonad [1] and two physical
> monitors with different size. In xmonad you have 9 workspaces by default
> and it allows you to have two of the workspaces to be seen at the the
> physical monitors. For doing a presentaion with a projector it would be
> beneficial to have one workspace to be shown at both physical monitors
> so you can see what the audience is seeing. Currently xmonad does not
> support this.
> 
> So theoretically I could use the xrandr tool to achieve that. I was able
> to get it working and it worked quit well. However I want this cloning
> behavior to be triggered by xmonad itself. Theoretically xmoand could
> dynamically apply xrandr commands and temporally move these CRTC things
> around the screen. However this does not seem to be a desirable
> approach. [2]
> 
> I came this fare to find out that xmoand uses XMoveResizeWindow() to
> place the window on the screen. However with XMoveResizeWindow() you can
> only provide one coordinate for the position at a time. So I would need
> something where I can submit a list of x and y's and the window gets
> cloned at the various places. Unfortunately I have not found anything
> like that.
> 
> So my question is: What would be the correct approach for my
> undertaking/What features are appropriate for this and do they actually
> exist/(And does my idea actually make sense)?
> 
> thanks for any help,
> Be
> 
> ----
> [1] https://github.com/xmonad/xmonad
> [2] I think xmonad should not manipulate what was configured by xrandr.
> One good reason for that appears to me that with xrandr you tell X how
> your pyhiscal devices are located on you desk. And then it is intuitive
> how you mouse appears and dissapears while you move around. Also your
> windows can float around between multiple monitors and different parts
> of the window appearing on diffrent monitors don't get shuffeled around.
> When the CRTC things get moved around the courser might get cloned as
> well as well as the floating windows. I would not consider this correct
> behavior for xmonad.
> 
> _______________________________________________
> xorg at lists.x.org: X.Org support
> Archives: http://lists.freedesktop.org/archives/xorg
> Info: https://lists.x.org/mailman/listinfo/xorg
> Your subscription address: %(user_address)s

-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
Carsten Haitzler - raster at rasterman.com



More information about the xorg mailing list