-*- 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
================

  ! underscores in window names create accelerators in menus

  ! raise-groups-on-focus is commented out

  ! running multiple instances of the wm loses

    (because they share the same ~/.sawmill/custom file)

  ! keeping unshown windows unmapped isn't so great

    (because the app may withdraw the window by unmapping it, but
    sawmill won't notice.. perhaps reparent the window+frame into a
    ``pseudo'' root window that is unmapped?)
    
  ! cancel the GNOME logout dialog, window decorations aren't redrawn

    [ after looking at the X event trace, I don't think it's a sawmill
      bug, since sawmill receives _no_ events after the iris effect is
      removed, until it finally redraws everything. Unless sawmill is
      somehow not recognizing that events are available..? ]

  ! play-sample.c doesn't seem to work on solaris (esdplay does)

  ! anim-outline just guesses where windows will be iconified to, so it
    usually gets it wrong

    [ the new GNOME/KDE wm hints have support for this ]

  ! timestamp ordering code falls over with machines that vary their
    clock rate..

  ! loading theme `Ganymede' into themer wedges it

  ! loading a session shifts window positions by the frame offset

    [ this only happens with apps that try to save and restore their
      own geometry (e.g. gnome-terminal); this is against the ICCCM... ]

  ! swapped-out window properties aren't saved with session

  ! menus appear too high in java/swing apps until window is moved

    [ works okay for me with SUN Java on Solaris.. ]

  ! * Open Netscape
    * Click the botton on the status-bar that brings the little
      browser/mail/news/editor toolbar into its own window.
    * Now iconify this window - instead of being iconfied on its own, it
      goes back onto main netscape browser window as if it was closed
    * Now open it again - SLAM!
    * Suddenly the window opens and closes like mad causing the window to
      flicker on the desktop so fast you can't click on anything to get
      rid of it, and you have to 'kill' it (sometimes it eventually dies
      on its own in a minute or two).

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

  ! 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)

  ! 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.

  ! edge-flipping while interactively placing a window can leave
    rubber-band traces [this is hard to fix..]

  ! if i press M-button1 (move-window-interactively) but not move the
    window and _hold_ button1, it gets raised, but the window
    decoration is not drawn, only if i move the window or release the
    button

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

  + write documentation: workspaces, viewports, window groups, alist
    frame patterns, frame parts as objects, placement, focus modes,
    symbolic event structures...

  + allow enter/leave-notify events to be suppressed?

    (use this when switching workspaces, but focus must be preserved)



Window manager tasks
====================

  + look into tear-off menus

    need some way of notifying when dynamically generated menus have
    changed

  + some hci ideas:

    placement mode to favour some/any of:

	- near other windows in the same group

	- extend cost components to include overlap, instead of overlap
	  being non-negotiable (i.e. able to trade overlap for locality)

    theme that has visual cues (colours?) for group membership

  + look at kde khotkeys for ideas

  + support the new GNOME/KDE wm interaction protocols

    the spec isn't finalized yet, but it has been 99% for a while..

    [ I've implemented most of the draft spec now ]

  + sound themes, and/or some method of configuring individual samples

  + drag-and-drop to configure window appearance?

    this could depend on the theme, but it would be good to allow
    dropping of colors (gradients?) and images for at least some themes

    add a hook (frame-part-drop-hook?)

    also allow theme files to be dropped on windows

  + Support other visuals

  + revamp the autoload system, and handle both customizations and
    functions

    scan all lisp files in directories outside of lisp-lib-directory
    and sawmill-lisp-lib-directory for autoload decls

    make sawmill-ui extract defcustom decls straight from lisp files
    somehow?

  + add a (destroyed . FUN) attribute to display-message

    also allow multiple messages to be displayed/managed

  + allow transparent backgrounds to frame parts

    need to use overlays, solaris X server supports two types, what
    about XFree?

  + add option to prevent workspace switching while cycling

  + threshold options to control window-move sensitivity?

  + wrap-around option for moving viewports

  + 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

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

  + allow configuration of where move/resize display appears

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

  + Handle multiple-screen displays

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

    [ use `Xnest -scrns N' to simulate multi-heading ]

  + Add checked and radio menu item support

  + Icons (?)

    Icons could be handled using a special frame/window type

  - Rotated text

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

    [ scp found a library for doing this with Xlib.. ]

  - 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..?

    re: engines, now that frame parts are proper objects, and thus
    fg/bg specifiers may be functions, it should be possible to spawn a
    GTK slave to do all redrawing (using the gtk_draw_foo functions)

    have to be careful to avoid deadlocks though. Maybe avoid using
    fifos for this reason, perhaps use SYSV shared memory segments and
    semaphores?

    [ I have a patch that does a first approximation of this, the
    problem however is that GTK doesn't have enough drawing primitives 
    to cleanly handle all buttons etc.. ]

  - 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

  - CORBA interface

    I have a prototype idl, but it needs rewriting. The idea is to
    basically reimplement the new GNOME/KDE wm hints using CORBA,
    perhaps with some other useful features

    Use rep-orbit to provide the CORBA binding



sawmill-ui tasks
================

  + nautilus-like ``user levels'' controlling when options get enabled

    (replaces the lame `advanced' sub-trees?)

  + do i18n on choices from `:type symbol' options

  + add a `Program Launchers' group, that allows commands to be defined
    for launching programs

  + split theme menu by first letter, if many themes to show

  + rewrite sawmill-ui to use ``items'' as in sawmill-themer (complex
    widgets represented by functional data types). This would allow
    more complex custom types, i.e. `(or number string)' etc...

    also, add provisions for extensibility (i.e. adding new item types
    at run-time)

    also, add simple dependences (i.e. widgets can be activated by a
    separate boolean option)

    another idea: textual search for options/commands

  + Allow text-entry commands in bindings dialog?



sawmill-themer tasks
====================

  ! only the `default' window type may be previewed

    [ workaround: temporarily change the `default' mapping ]

  + allow functional frame part attributes to be defined

    possibly add an `(extra sexp)' field that is evaluated then added
    to the end of the frame part definition 

  + allow dynamic patterns to be defined (e.g. gradients)

  + better previewing:

    * highlight the current frame part somehow

    * clicking/hovering on a frame part selects that definition

    * auto-update, either after each change, or from the idle-hook?

  + support a pseudo-pattern containing the window's icon
