-*- indented-text -*-

TODO list for sawmill
*********************

Bugs are marked !, things that should be done soon are marked +,
and longer-term ideas are marked -


Outstanding bugs
================

  ! multiple viewports, gnome tasklist only shows windows when on
    viewport (0,0), but then shows all windows on the workspace

  ! OK button in bindings capplet loses bindings until a different
    window is focused

    [ 12/10: what's actually happening is that the cc is becoming
    unfocused, but without any other window (or our no_focus_window)
    being focused afterwards.. ]

  ! It's not possible to compile sawmill-ui.jl without an X connection
    (it requires 'gtk, which then calls gtk_init (), ...)

  ! ICCCM says we should not passive grab on the client windows, but on
    our frames instead

  ! Every once in a while (haven't figured out a pattern yet), the
    mouse cursor locks up, and won't move at all.  After I press a
    mouse button, it goes back to normal again.

    (this could be due to grabbing in SyncPointer mode, but
    XAllowEvents should always be called..?)

    [ 24/10: has this been seen recently? I think it may be fixed..? ]

  ! xv/java-apps get weird placement [apps being non-ICCCM compliant?]

  ! (getpid) has been obsoleted by rep's (process-id)

  ! without gmc, click on root, drag over window title, drag window,
    release button, move back onto root, title still highlighted

  ! the gnome _WIN_MAXIMIZED_ hints are ignored when the window is
    mapped, since it's not possible to maximize the window at that
    point (until the frame has been created)

  ! cycle-windows with only one window temporarily unfocuses the window

  ! Num_Lock is filtered, but not Scroll_Lock

  ! shouldn't be able to maximize non-resizable windows

  ! turn off mouse warping options, put cursor in window in center of
    screen (under message window), M-TAB, and the pointer leaving the
    message window will refocus the original window

  ! I bring up an exmh transient, and place it so it's totally enclosed
    by the exmh parent window.  I put my mouse in the middle of the
    transient so it has focus (I'm using sloppy focus.)  I then move to
    a different desktop, and back. The transient window has focus still
    (ie. I can type in it), but the frame is drawn in the unfocused
    style.

  + features can't be both enabled via customization and demand-loaded


General tasks
=============

  + add option send-window-to-workspace won't select workspace

  + follow size hints (increments) when maximizing (?)

  + "styles" -- mimic different environments through custom files?

  + allow cursors to be customized (i.e. when moving/resizing/..)

  + support for synthesizing events

  + visual cue for sticky windows?

  + add focus-order to smart placement weights?

  + threshold options to control window-move sensitivity?

  + placement fall-back options?

  + add a gradient frame with side pieces

  + ui method for matching windows to attributes

    allow matching of WM_CLASS as well as WM_NAME

  + wrap-around option for moving viewports

  + use panes to separate areas in bindings widget

  + allow workspaces to be named?

    this is done, set the workspace-names variable to a list of
    strings; but it's not yet customizable through the ui

  + features for the gnome/redhat guys:

    * code to read the gnome apps menu, then replace apps-menu
      [2/10: this is pretty much done: (require 'gnome-menu)]

    * remove restart/quit/[about?] from the root menu

    * launch capplet instead of standalone config tool
      [use customize-program and customize-group-opt to do this]

    * 2x2 workspaces [30/9: this has been done]

    there will be a new lisp module (`gnome-int'?) that has these
    things as options (enabled by default). It will also require
    'gnome.

  + add capplet desktop entries to share/gnome/apps/Settings as well as
    the control center tree

    then again.. there's a problem with this -- gnome menus are
    _static_, whereas sawmill's customization groups are _dynamic_

    i.e. the `customization' root sub-menu wouldn't match the menu in
    the gnome `settings' tree. this would be bad since the user may not
    discover the dynamic menu and thus miss many of the options..

    [ apparently, this is an issue which may be addressed in future
      versions of the control center ]

  + tooltips in frame parts describing their keymaps

    requires extending show-message to do multi-line (justification?)

  + in interactive placement, allow the window-pointer position to be
    configurable 

  + change edge snapping to use resistance instead of magnetism?

    perhaps allow mode to be set as an option; it would be nice to
    differentiate between screen edges and window edges

  + allow configuration of where move/resize display appears

    allow relative to window, or relative to root, for both x and y

  + Allow text-entry commands in bindings dialog?

  + windows appear above xscreensaver?

    there's no way around this, xscreensaver maps its virtual root
    window with override_redirect set, so the wm never even sees it
    (otherwise it could be moved to an upper layer)

  + Handle multiple-screen displays

    What are the issues? Multiple root windows, and..?

  + Add checked and radio menu item support

  + Smart placement

    How can the best-fit cost function be improved/optimised?

  + Handle window groups

    groups as defined by the apps themselves? or user-defined groups?
    or both?

  + better transient handling

    When moving a window to another workspace, also move any transients (?)

  + Pixmap cursors / cursor recolouring

  + Icons (?)

    Icons could be handled using a special frame/window type

  + Support the KDE hints

    Where are they defined?

  + clone some ctwm functions:

       f.pack string
               Where string is either : "right", "left", "top" or
               "bottom" The current window is moved in the speci
               fied  direction  until  it  reaches  an   obstacle
               (either another window, or the screen border). The
               pointer follows the window.

       f.bottomzoom
               This function is similar to the  f.fullzoom  func
               tion, but resizes the window to fill only the bot
               tom half of the screen.

       f.leftzoom
               This variable is similar to the f.bottomzoom func
               tion  but  causes  the  selected  window  is  only
               resized to the left half of the display.

       etc.

  - Rotated text

    Allow text to be rendered at angles (in multiples of 90 degrees?).
    This could be useful for the sides of windows

  - GTK theme

    Is there any way that the gtk theme could support engine-based GTK
    themes? Probably not without using a subprocess (since the engines
    are written to GDK, not Xlib), this could get hairy..

    Also, why do themes with bg_pixmap set use so much memory? Is it
    just because the images are XPM's..?

  - Internationalisation

    This should be quite easy, since most strings are stored in the
    documentation databases anyway. So we just need to provide multiple
    DOC files, and some tool to aid in the translation/construction
    process (something like PACE's HMCL parser?) We could probably make
    this tool compatible with the usual .po files

    There are still some strings that aren't already handled as doc
    strings (i.e. menu labels, errors, a few things in sawmill-ui).
    These can also be stored in the DOC file. All keys in the DOC file
    currently start with either `S' (subr) or `V' (variable). So just
    add a new prefix `T' for text string, then use the original string
    as the rest of the key

    This needs to be in rep really. Add a (gettext ID STRING) macro
    that interprets to STRING. The compiler adds STRING to the doc file
    under key ID, inserts code to fetch it back [how can we lose the
    annoying ID parameter?]

    Another option is to have `(defstring VAR STRING)' which resolves
    all strings when the module is loaded, but then you have to declare
    all strings up-front, which would be _really_ annoying

    Also, what about the "%1$s" style printf formatting. rep's format
    function should be extended to handle this syntax


Long term ideas
===============

  - Remove root menu?

    The argument is that doing this removes the need for the wm to
    select ButtonPress events on the root window (which is a point of
    conflict with, for example, a desktop file manager)

    The sole need for the wm to manage the root menus (as far as I can
    see) is so that it can offer window management functions (such as
    "interactively move the focused window" or whatever), but all
    these things can be invoked through sawmill-client, i.e.
    "sawmill-client -c move-window-interactively"

    With a bit of work the dynamically generated menus (e.g. the window
    and workspace submenus) could also be generated through the client

  - Target guile instead of rep

    In theory this is a good idea, probably a lot of work, but still.
    These are some of the arguments/justifications for sticking with
    rep:

	1. The single-threadedness is not a problem for a window
	   manager, where the flow of control pretty much follows the X
	   event queue

	2. It's lighter-weight than guile (though the effects of sharing
	   libraries probably negates this a bit)

	3. I have some half-cooked ideas about using the built-in
	   remote-file handling to access a theme repository somewhere

	4. It has lots of support (i.e. hooks, input handling) for
	   being used as an extension language

    And these are some reasons for using guile:

	1. Scheme's a cleaner and more modern language than rep's Lisp
	   dialect (one namespace, lexical scope, continuations, ...)

	2. More people know scheme than lisp (though the closeness to
	   Emacs-lisp offsets this)

	3. Sawmill would depend on fewer "weird" libraries (librep,
	   rep-gtk), that someone (i.e. me) has to maintain

    The main things counting against guile are that I've never used it,
    and that I'm lazy

  - CORBA interface

    First write CORBA support for rep (does guile support CORBA?), then
    what? Would this be useful?

  - Theme repository

    Something similar to foo.themes.org, but I want to be able to load
    themes straight from the net

    They could be loaded through the remote-ftp system (would need to
    redefine pwd-prompt somehow, GTK?), then installed in the user's
    local theme directory, then activated (all without restarting the
    wm)

    How about a drag 'n drop target in the configurator. Load the
    specified URI then install the theme it contains

    This way you should be able to drag from both netscape and the file
    manager to activate a theme

  - Theme builder

    Use the client to frame a temporary window with control over its
    decorations (GTK interface), then output the Lisp code to build the
    theme
