Transparent Background

the server for X Window

Fortunatelly, the borderClip or the clipList in the window structure (windowstr.h) contains the exposed region of a window. So, once the window to be transparentized has been decided, the transparent region can be easily obtained.

The problem is how to determine the transparent window. If it is the case of traditional window manager like TWM, the root window should be transparent. But in the case of modern window manager (or desktop environment) like GNOME or KDE, desktop window (which is not the root window) should be transparent.

MetaVNC implement a little bit tricky way to detect the desktop window. This is done by the guessBackGroundWinClip?() in the xc/programs/Xserver/hw/vnc/rfbserver.c.

In some cases, this method does not work correctly. So, on version 0.6.5 or later, the policy of detecting transparent window is selectable by options.

For more details, see source code in xc/programs/Xserver/hw/vnc/.

the server for MS-Windows 2000/XP

On the MS-Windows version, tranparent region can be obtained by the followings;

  1. Visible window lists are maintained by the meta window manager.
  2. By subtracting all visible window regions from the desktop region, transparent region can be obtained.

Meta Window Manager

the server for X Window

The windowmonitor is used as a part of the Meta Window Manager.

  1. The libwnck is used to monitor and control windows and retrieve their icons.
  2. Launcher items are retrieved by searching applications directory in the $XDG_DATA_DIRS.
  3. Icons for launcher items are retrieved by searching icons directory in the $XDG_DATA_DIRS.

the server for MS-Windows 2000/XP

  1. The original vnchooks.dll is enhanced to notify window changes by using WH_CALLWNDPROC.
  2. Changes of console windows are detected by polling in vncDesktop::checkUpdates().
  3. vncWindowMonitor? maintains list of visible windows and taskbar windows. it also process polling on console windows.
  4. vncLauncher reads application menus and launches applications by client requests. When the server runs in service mode, the service helper performs the launch process to run applications in the login user's privilege.
  5. vncIconMgr? generates PNG images from Windows icons (HICON).

the client for MS-Windows 2000/XP

On the MS-Windows version, remote menus and task switches are integrated with local menus and task switches.

Task switches are implemented as follows;

  1. the viewer creates an Window corresponding to a remote window (MetaTaskbar?::createTaskSw?)
  2. this window processes operations against the task switch of the remote window (MetaTaskbar?::WndProc?)
  3. ITaskbarList? is used to add and remove task switches

Note that the behavior of these task switches are still weird.

Start menus are implemented as follows;

  1. the viewer creates a shortcut corresponding to a remote menu item
    vncviewer -launch <HWND of the vncviewer>:<menu item ID>~
  2. if vncviewer.exe is launched with -launch option, it sends message to given HWND. At this time, the WindowClass? of HWND is checked (MetaLauncher?::launch)
  3. the viewer receives the message and sends rfbWindowControlLaunch? command to server.

The shortcuts of remote menus can be located in the same directory as local menus or other remote menus (See Setting up the Win32 version client). To avoid conflicts of shortcut names, "@"+remote desktop name is postfixed.

Front page   Edit Freeze Diff Backup Upload Copy Rename Reload   New List of pages Search Recent changes   Help   RSS of recent changes
Last-modified: 2007-09-15 (Sat) 14:39:55 (3780d)