Re: FVWM: Using fvwm as basis for another WM

From: Mikhael Goikhman <migo_at_homemail.com>
Date: Fri, 1 Aug 2003 04:26:00 +0300

On 31 Jul 2003 23:56:21 +0100, Scott McWhirter wrote:
>
> We're currently trying to implement a window manager that using the
> gecko rendering engine to do window decoration rendering (as well as
> control window position, size, etc.). We were considering designing our
> own WM, however after a tip-off I discovered that fvwm may have a better
> solution.
> My real question is, wether it is an easy process to allow our frontend
> stuff handle the window decoration and allow communication to fvwm, in
> terms of interface anyways.

Here are my humble thoughts.

You may write your own module that handles window decorations.

Since the existing decoration code is very hardwired into fvwm and can't
be interfaced within the modules, it is easier not to use it at all.
Instead, your module may swallow (reparent) a window and add any
decoration to it. Think about FvwmButtons, or maybe FvwmTabs.

Here is a possible scenario. You create FvwmGeckoDecors module (I guess
in C, but Perl is possible too). The user may configure it statically
either using your own format in ~/.fvwm/.FvwmGeckoDecors or using the
fvwm module configuration style:

  *FvwmGeckoDecors: WoodTheme TopLeftTitleImage brown-tlt.png

  *FvwmGeckoDecors: Mouse 3 T S RaiseLower # Shift-Mouse3 on title

He may send dynamical actions to the module too:

  SendToModule FvwmGeckoDecors SwitchTheme metal

This suggests that your module implements the mouse/key bindings similar
to what is used with the native fvwm decorations. And then send the
configured commands back to fvwm for execution (in our case above it is
RaiseLower).

Now, you have several choices of which windows should be redecorated by
your FvwmGeckoDecors. You may make it choosable by a user:

  Mouse 1 W CM FvwmGeckoDecors # Ctrl-Alt-Mouse1 in window
  Key G A SCM Pick FvwmGeckoDecors # Shift-Ctrl-Alt-G anywhere

or just listen to add_window packet and swallow any new window.

This is just one possible scenario. To help it work well, you may set all
windows to be without the native decorations.

  Style * !Title, !Borders # you work with cvs, right?

Or at least make the module window (gecko decors) naked:

  Style FvwmGeckoDecors !Title, !Borders

For the smooth performance you most likely need to modify fvwm, but this
is not needed just to start with the implementation. The best solution is
probably to move the current window decoration code to modules, but this
would be pretty difficult.

Regards,
Mikhael.
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Thu Jul 31 2003 - 20:27:48 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:55 BST