PDA

View Full Version : Individual Desktop Wallpapers per Viewport


FunkyM
March 22nd, 2007, 11:42 PM
I know a lot of people would like to have multiple wallpapers on their "viewport" faces with a usable desktop manager and next to the input redirection I consider it as one of the better (and long time ago requested) feature to implement which will certainly be a usability improvement.

If I remember correctly, even David had multiple wallpaper support listed as a TODO for compiz!

I'd like to ask what would be required to implement something like this and make it become reality since I think this is one overdue feature. Using the wallpaper plugin while loosing the desktop interoperability is just wrong in my opinion.

I have read somewhere that it might be sufficient if the desktop managing application (nautilus for instance) would not draw the root window or actually make it a RGBA one (so compiz can draw behind it) or similar.

Creating your own desktop environment like beryl does is sure the wrong approach if you ask me. In my eyes existing desktop manager should be extended as they include "years of implementation".

The best solution would eventually allow us to direct any content as a desktop background (image, video, window...).

The code in nautilus drawing the background is quite straightforward so we should be able to get this moving...

RYX
March 23rd, 2007, 01:10 AM
Wouldn't this be (more or less) easily possible by modifying nautilus to use libwnck and change the background on viewport_changed-events. I think all needed information is available through either wnck, gdk or the root-window properties. As you say - it should be pretty straight-forward. :)

But maybe it would also make sense to write a lightweight-replacement for the desktop because nautilus is really bloated already. It shouldn't be difficult to write a small python-app which implements drag&drop feature and variable backgrounds for multiple viewports ... (only a thought ).

:)

FunkyM
March 23rd, 2007, 03:00 PM
Wouldn't this be (more or less) easily possible by modifying nautilus to use libwnck and change the background on viewport_changed-events. I think all needed information is available through either wnck, gdk or the root-window properties. As you say - it should be pretty straight-forward. :)

I did this in the early days of compiz using a simple shell script which monitors root window viewport hints and sets a wallpaper on the currently viewed desktop/viewport.

Still, you won't really get individual wallpapers per viewport if using the cube for instance and is really a hack, rather than a real solution.

But maybe it would also make sense to write a lightweight-replacement for the desktop because nautilus is really bloated already. It shouldn't be difficult to write a small python-app which implements drag&drop feature and variable backgrounds for multiple viewports ... (only a thought ).

nautilus is bloated (?) and I would not be interested to reimplement that bloat (gnome-vfs integration, different style lists, script interface, extensions, nautilus-share integration, desktop location handling, ...) as stated in my previous post.

I'd like to talk about the technical solutions; I know you can get any language with appropriate bindings to give you background plus drag and drop control in a very basic way.

How to achieve displaying multiple wallpapers at once technically?

Currently I think this is the only way:

Create a compiz wallpaper plugin and make nautilus use a RGBA background. nautilus would communicate to that plugin to draw the background a user assigns for a given viewport. As the compiz plugin would know about the viewports and background, it could draw different wallpapers even when using the cube. On the Z-axis, the background "layer" would be behind the desktop layer with the windows stacked ontop.
So if you use the 3D plugin your icons would fly above the wallpaper for instance.

lowfi
March 23rd, 2007, 03:46 PM
the functionality is already there. david just gave a presentation on brainshare which had different wallpapers and also different xwinwrap like animations on each viewport.

the presentation should be online very soon here:
http://www.novell.com/brainshare/general_sessions07.html

FunkyM
March 23rd, 2007, 05:28 PM
http://media.sukimashita.com/temp/novell-brainshare-fri-compiz-sled-sp1.jpg

/me worships David
/me wants the SLED SP1 changes ;D

It appears they extended nautilus as you even have individual desktops per viewport (icon arrangement etc.) alongside individual wallpapers.

rememo
March 23rd, 2007, 05:42 PM
:D me too, I hope Davids input redirection gets in xorg7.3, this is amazing!

FunkyM
June 8th, 2007, 11:15 AM
Getting there... ;)

http://media.sukimashita.com/temp/compiz-multi-desktop-1.jpg

Sorcerer
June 8th, 2007, 11:37 AM
Cool, FunkyM! How did you do it?

FunkyM
June 9th, 2007, 11:06 PM
Preperation to reproduce the hack:

1. openSuSE 10.2-10.3: Get eel and nautilus packages (http://rpm.sukimashita.com/10.2/).
OR
1. Patch yourself eel (http://media.sukimashita.com/temp/00-eel-444320-dont-draw-desktop-when-compiz-does-1.patch) (disables background handling) and nautilus (http://media.sukimashita.com/temp/00-nautilus-444320-use-argb-colormap-for-background.patch) (adds ARGB support). (from bgo #444329 (http://bugzilla.gnome.org/show_bug.cgi?id=444320) by racarr)

2. Apply this patch (http://media.sukimashita.com/temp/00-compiz-dont-check-desktopwindowcount.patch) to Compiz.

3. Ready

Making it work:

Now Compiz is able to draw the background while you have a perfectly usable nautilus desktop.

To draw them you have two options currently:
- Either use the "cube" plugin's "backgrounds" setting and specify a list of images to draw
- Use racarr's wallpaper plugin (http://gitweb.opencompositing.org/?p=compcomm/plugins/wallpaper;a=summary)

Notes:
The cube plugin drawing is more efficient than racarr's wallpaper plugin and uses less video memory (important for nvidia black window bug ppl.) but it logically only works if you are actually using the cube plugin and has minor issues with other plugins like expo. The wallpaper plugin works fine with expo and allows for layered wallpaper effects (thus an image with a gradient color overlay with different alpha values for instance).

Regarding the future implementation, I think we should rip out the background drawing into a seperate plugin upstream (just compare code duplication in compiz/src/paint.c:paintBackground() with cube.c's cubePaintBackground and get a laugh) in order to make other plugins (such as expo or future stuff) automatically benefit from this.
It will also ease enchancements such as animations or drawing other stuff on the background in the future. Most of the stuff like solid/gradient colors, tiled/stretched images and compositing them looks better done in OpenGL (like the cube plugin's code already demonstrates) as it's simply more efficient than working with huge pixmaps.

The patch for nautilus is probably OK to go upstream, but the eel patch won't go upstream for sure (the noted atom is not even standardized). There needs to be work done on a _NET_CM_* specification to incorporate Compiz support into various applications so it doesn't end up being a hack. ;)

Ah, and some freak needs to ask David R. on the ML about this feature being available in SLED SP1.

gilir
June 15th, 2007, 12:47 PM
Thanks a lot :) Working fine here with backgrounds settings of the cube :) Finally I can have differents wallpapers for the cube :) /me happy :)

I have a question : why the patch for compiz is not include in the git ? Is it a hack ?

FunkyM
June 15th, 2007, 03:45 PM
I quote myself: Preperation to reproduce the hack:
It's ALL a hack ;)

Usually Compiz checks if you got "someone" who handles the desktop drawing (nautilus in this case) and thus cube refuses to draw the backgrounds. That patch basically makes Compiz think the opposite and allows drawing.

A short term (clean) solution for upstream GIT might be to include an option to the core to "force_background_drawing".
A better one is to wipe out the paintBackground stuff from cube and core into a "background" plugin upstream which checks for a required Atom set by the desktop manager.

vertigo1980
June 21st, 2007, 06:22 AM
thanks for the patch! :)

a little OT, but FunkyM, could you please provide links to, or upload the wallpapers in your screenshot? they look fantastic!

FunkyM
June 25th, 2007, 05:33 PM
thanks for the patch! :)

a little OT, but FunkyM, could you please provide links to, or upload the wallpapers in your screenshot? they look fantastic!

Dog:
http://iconfactory.com/freeware/desktop

Panda (old Blizzard Wallpaper):
http://www.blizzard.com/misc/samwise/panda.html

Clouds (trouble finding source website):
http://img525.imageshack.us/img525/6901/upintheair6vm.png

vertigo1980
June 25th, 2007, 11:16 PM
thanks FunkyM, much appreciated :wink: