Saturday, January 30, 2010

Cellwriter translucence and docking

Cellwriter is my primary on screen virtual keyboard now. But the docking or translucence does not work for me until recently. Now I finally find a way to make it work.

Translucence

Translucence is not the cellwriter's business in fact. It is done by a composite window manager such as compiz. To configure it in compiz, using compizconfig setting manager:

  • Enable "Regex Matching" under "Utility" section.
  • Enable "Opacity, Brightness and Saturation" under "Accessibility" section. Configure this item:
    • In "Opacity" tab page, add "Window specific settings", "class=Cellwriter" for "Windows", "50" for "Window values".
Docking

Cellwriter has full docking support in fact. But it does not work properly in metacity on x86_64. Seems there is a bug of cellwriter and an issue of metacity of gtk+.

  • Enable "window docking" in cellwriter setup.
  • Invoking cellwriter with command line option "—window-struts".
  • Apply the patches to cellwriter (1.3.4).

At first, I found _NET_WM_STRUT_PARTIAL has no effect. After comparing the window strut setting of cellwriter and gnome-panel, I found the main difference lies in data type of struts structure passed into XChangeProperty. Cellwriter uses int, while gnome-panel uses gulong. So I try gulong in cellwriter, and it works like a charm!

Although the format of struts structure passed into XChangeProperty is 32, in "man XChangeProperty", I found following words:

"If the specified format is 32, the property data must be a long array."

So format 32 should be 64-bit on 64 bit machine in fact, and struts should be long instead of int.

No comments: