ratpoison-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RP] Patch for frames et al...


From: Mike Meyer
Subject: [RP] Patch for frames et al...
Date: Mon Oct 29 13:09:03 2001

Well, I've got the patch and was going to put it on my web server -
but  said server is currently down, awaiting diagnosis.

I've got ~96K of patch file, and I think that's a bit much to send to
the list. So if you want a copy, drop me a note and I'll send it to you.

Here's the README.

This patch adds the following functionality:

frames are now numbered and named like windows, except they all have
"Unnamed" as the default name.

numberframe, titleframe and selectframe commands that behave like
their window equivalents exist. " and C-" are bound to selectframe.
The command focusprev - opposite direction of focus - existed but
wasn't in the command table. I went ahead and added it.

There's also a "place" command, that takes two arguments. The first is
what would be used by select to choose a window, the second is what
would be used by selectframe to choose a frame. The selected window is
opened in the selected frame. If it was open in another frame, the
"next" window will be opened in that frame if possible. If there is no
"next" window, the frame will be blanked.

The frames command works like the windows command. defframefmt sets
the default format used by the frames command.  Frame formats include
the %w specifier, which gets you the window name if there is a window
open in that frame. The initial default frames format is %n%s%w, that
being more usefull than %n%s%t.

More commands now return values. All the variable-setting commands
except those requiring knowledge of X do so, both interactively and
from scripts. Error messages should start with the command name and a
:, value messages should end with the value(s) for script
parsing. Failure to do so means I goofed. Possibly this should be
changed so that non-interactive commands just get the values, but I
didn't do it that way.

Misc. changes:
definputwidth now insists on a window width > 0.
Setenv now handles values with imbedded spaces (and leaves trailing
    spaces in place).
Window - and frame - formats now deal with unknown characters after a % in
    the format by inserting just that character.
defbarloc now uses gravity, not integers. All 9 of them work.
Select no longer raises the window list if you select a number that doesn't
    exist. This was done so that windows names could be numbers.
    [Ok, it also made the select code *much* cleaner]

Things to watch for while testing: memory leaks! I've already fixed a
couple. Slowdowns due to the internal changes described below.

A lot of the changes involved finding places where the windows and
frames code did nearly the same thing - or needed to do it if the
frames code didn't exist. These were then changed from a function - or
just a bit of code - that used some global variables to a function
that had those globals passed in as arguments so the code could be
used for both windows and frames. In some cases, repeated short code
segments turned into repeated function calls, which trades time for
space.

In particular, I added a function that applies a funarg to each
element in a list, and replaced a number of loops with invocations of
that instead. I did not replace any loops that had no function calls,
figuring that was to much speed for to little space. This decision may
be changed later.

Finally, I made references to the current frame mimic references to
the current window, so that any cases where the current frame pointer
is null will generate error messages, just like it does in referencing
the current window. That trades speed for reliability.


Question:
change defbarloc to defbargravity?

Docs for all the above to be done. While I'm at it, The time command
is listed in the docs as "clock".

        <mike
--
Mike Meyer <address@hidden>                     http://www.mired.org/home/mwm/
Q: How do you make the gods laugh?              A: Tell them your plans.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]