Compiz & XFCE — Disagreement on Number of Workspaces / Cube Faces

compizxfce

What Puzzles Me

When I use XFCE with xfwm4 I have 4 workspaces

 $ xfconf-query -c xfwm4 -p /general/workspace_count
 4
 $

but after I start Compiz (I have previously set the number of faces to 4)

 $ compiz --replace < /dev/null > /dev/null 2>&1 &
 $ xfconf-query -c xfwm4 -p /general/workspace_count
 1
 $

the Cube has four sides (as requested), but XFCE thinks it has only
one workspace — still it is possible to rotate the cube clicking in
the Workspace Switcher plugin, in the panel, that still shows 4 panes
— on the contrary the Window Menu shows one workspace only, with all
the windows in it and selecting a window on another face of the cube
doesn't work.

My Question

I'd like to know if I'm missing something obvious (I mean "set this
option and it works" rather than "it has to be like this, because…")
or on the contrary I have a genuine bug to report to Compiz's
Tracker
.

Boring details:

Debian Sid
xfce4 4.12.3
compiz 1:0.9.13.0+16

Salutations

Thanks in advance,

Best Answer

Xfce has workspaces/desktops. Compiz however, has viewports instead of workspaces/desktops. There is only a single desktop, which grows in size as you add more desktops.

Xfce switches desktops, while compiz moves viewports. In compiz, parts of a window may be visible on two cube faces, while in xfce a window is only ever visible on "its" workspace (sticky windows aside).

You can query the number of desktops with wmctrl -d:

In xfce with four desktops, this gives you:

0  * DG: 1920x1080  VP: 0,0  WA: 0,0 1920x1032  Workspace 1
1  - DG: 1920x1080  VP: N/A  WA: 0,0 1920x1032  Workspace 2
2  - DG: 1920x1080  VP: N/A  WA: 0,0 1920x1032  Workspace 3
3  - DG: 1920x1080  VP: N/A  WA: 0,0 1920x1032  Workspace 4

This tells you that

  • there are four desktops
  • each having the size of my screen
  • each having a work-area (WA) the size of my screen
  • the first desktop is active and has a viewport with position 0,0

When you move to the second desktop, the active desktop changes:

0  - DG: 1920x1080  VP: N/A  WA: 0,0 1920x1032  Workspace 1
1  * DG: 1920x1080  VP: 0,0  WA: 0,0 1920x1032  Workspace 2
2  - DG: 1920x1080  VP: N/A  WA: 0,0 1920x1032  Workspace 3
3  - DG: 1920x1080  VP: N/A  WA: 0,0 1920x1032  Workspace 4

However, once compiz is started, you'll get

0  * DG: 7680x1080  VP: 0,0  WA: 0,0 1920x1032  Workspace 1

This tells you that

  • there is only a single desktop
  • it is 7680 pixels wide
  • the viewport-area is 1920 pixels wide, the size of my screen
  • the desktop is four times as wide as the viewport
  • the viewport is positioned at 0,0, i.e. leftmost

When you rotate to the second cube face, the viewport-position changes its x-coordinate while everything else remains unchanged:

0  * DG: 7680x1080  VP: 1920,0  WA: 0,0 1920x1032  Workspace 1

When you start compiz it sets the number of desktops to 1. With the xfconf daemons running, this change is propagated to xfconf and resets the xfce workspace_count to 1.

I don't know if there is anything you can do about this and it is usually not a big issue. It only bothered me, because I am using xfdesktop to draw icons and I wanted to have different wallpapers for each cube face. I configured xfce accordingly, but inside compiz I the wallpaper of the first desktop on all cube faces.

I don't know why your window list doesn't work. Mine also (correctly) lists all windows on a single desktop, but selecting a window works just fine and rotates the cube if the window is on another cube face. It works both with the middle-click window-list of xfdesktop and the window menu item of xfce4-panel.