summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsabetts <sabetts>2006-01-03 21:34:20 +0000
committersabetts <sabetts>2006-01-03 21:34:20 +0000
commit1d3b753b428842fc9c0bdc6d9ccc9e2289239ffa (patch)
tree99e3b68f6d43a05ec936912c1a101eca88584cc6
parent4d51c49a9428837d6adc638f442717178b2d2b2f (diff)
downloadratpoison-1d3b753b428842fc9c0bdc6d9ccc9e2289239ffa.zip
* src/number.c (numset_add_num): store the ret val of
numset_find_empty_cell in a variable and use it as an index into the numbers_taken array. * src/actions.c (cmd_curframe): return the frame number in non-interactive mode. * src/split.c (cleanup_frame): in the maxsize windows are transients check either the width or height must be less than the screen width/height (just like in windows.c).
-rw-r--r--AUTHORS43
-rw-r--r--ChangeLog13
-rw-r--r--doc/ratpoison.15
-rw-r--r--doc/ratpoison.texi66
-rw-r--r--src/actions.c16
-rw-r--r--src/main.c4
-rw-r--r--src/number.c8
-rw-r--r--src/split.c4
8 files changed, 96 insertions, 63 deletions
diff --git a/AUTHORS b/AUTHORS
index 7820d30..c58676b 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -13,24 +13,25 @@ Meanwhile, the patches are piling up.
Other Contributors:
-Ben Leslie <benno@sesgroup.net>
-Chr. v. Stuckrad <stucki@math.fu-berlin.de>
-Dan Aloni <da-x@gmx.net>
-Doug Kearns <djkea2@mugc.its.monash.edu.au>
-Gergely Nagy <algernon@debian.org>
-Henrik Enberg <henrik@enberg.org>
-Jonathan Walther <krooger@debian.org>
-Martin Samuelsson <rp-contrib@cos.user.lysator.liu.se>
-Mike Meyer <mwm@mired.org>
-Nicklas Lindgren <nili@lysator.liu.se>
-Pasi Kallinen <pkalli@cs.joensuu.fi>
-Rupert <rupert.debian@hotpop.com>
-Tim Goodwin <tjg@star.le.ac.uk>
-Joshua Neuheisel <jneuheisel@msn.com>
-Thien-Thi Nguyen <ttn@surf.glug.org>
-Joshua Neuheisel <jneuheisel@msn.com>
-Sylvain BEUCLER <beuc@beuc.net>
-Cameron Patrick <cameron@patrick.wattle.id.au>
-Trent Buck <fubarbaz@bigpond.com>
-jesus c. meyendriesch <jesus@qplay.org>
-Bernhard R. Link <brlink@debian.org>
+Ben Leslie <benno at sesgroup dot net>
+Chr. v. Stuckrad <stucki at math dot fu-berlin dot de>
+Dan Aloni <da-x at gmx dot net>
+Doug Kearns <djkea2 at mugc dot its dot monash dot edu dot au>
+Gergely Nagy <algernon at debian dot org>
+Henrik Enberg <henrik at enberg dot org>
+Jonathan Walther <krooger at debian dot org>
+Martin Samuelsson <rp-contrib at cos dot user dot lysator dot liu dot se>
+Mike Meyer <mwm at mired dot org>
+Nicklas Lindgren <nili at lysator dot liu dot se>
+Pasi Kallinen <pkalli at cs dot joensuu dot fi>
+Rupert <rupert dot debian at hotpop dot com>
+Tim Goodwin <tjg at star dot le dot ac dot uk>
+Joshua Neuheisel <jneuheisel at msn dot com>
+Thien-Thi Nguyen <ttn at surf dot glug dot org>
+Joshua Neuheisel <jneuheisel at msn dot com>
+Sylvain BEUCLER <beuc at beuc dot net>
+Cameron Patrick <cameron at patrick dot wattle dot id dot au>
+Trent Buck <fubarbaz at bigpond dot com>
+jesus c. meyendriesch <jesus at qplay dot org>
+Bernhard R. Link <brlink at debian dot org>
+Tobias C. Rittweiler <tcr at freebits dot de>
diff --git a/ChangeLog b/ChangeLog
index 96ca2ec..d9bc7e0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2006-01-03 Shawn Betts <sabetts@vcn.bc.ca>
+
+ * src/number.c (numset_add_num): store the ret val of
+ numset_find_empty_cell in a variable and use it as an index into
+ the numbers_taken array.
+
+ * src/actions.c (cmd_curframe): return the frame number in
+ non-interactive mode.
+
+ * src/split.c (cleanup_frame): in the maxsize windows are
+ transients check either the width or height must be less than the
+ screen width/height (just like in windows.c).
+
2005-12-11 Shawn Betts <sabetts@shitbender.gagrod>
* src/manage.c (withdraw_window): call rp_delete_window_hook hook
diff --git a/doc/ratpoison.1 b/doc/ratpoison.1
index 7ff414c..5231014 100644
--- a/doc/ratpoison.1
+++ b/doc/ratpoison.1
@@ -458,7 +458,10 @@ configuration: By pressing \fBC-t\fP, which is the only key in the keymap
\fBtop\fP, the command "\fBreadkey root\fP" is executed. The next key
then executes the command in keymap \fBroot\fP belonging to this command.
.cmd redisplay ( C\-t l )
-Redisplay the current window.
+Extend the current window to the whole size of its current frame and
+redisplay it.
+(Useful to redisplay normal windows or bring transient windows to the
+full size of the frame as only normal windows are maximized by ratpoison)
.cmd redo ( C\-t U )
Revert the last \fIundo\fP of frame changes.
.cmd remhook event command
diff --git a/doc/ratpoison.texi b/doc/ratpoison.texi
index a50184b..37f07ee 100644
--- a/doc/ratpoison.texi
+++ b/doc/ratpoison.texi
@@ -219,7 +219,7 @@ The following are commands used to manipulate windows.
@deffn Command select @var{n}
This jumps you to window @var{n} where @var{n} is the window number as
shown in the Program Bar. You can do the same trick with
-@command{C-@var{n}} too. To select no window, blanking the current
+@kbd{C-@var{n}} too. To select no window, blanking the current
frame, type @samp{select -}.
@end deffn
@@ -298,7 +298,7 @@ center the window in the frame. @var{g} and can be abbreviated to the
standard compass 1 and 2 letter abbreviations (i.e. @samp{nw},
@samp{s}, etc).
-When called non-interactively with no arguments, the current setting is
+When called with no arguments, the current setting is
returned.
@end deffn
@@ -315,8 +315,7 @@ the WMCLASS hint. @var{name} can be @samp{title} which is what most
window managers put in the title bar, @samp{name} which is the
res_name, or @samp{class} which is the res_class.
-When called non-interactively with no arguments, the current setting is
-returned.
+When called with no arguments, the current setting is returned.
@end deffn
@deffn Command {set wingravity} @var{g}
@@ -324,8 +323,7 @@ returned.
Set the default gravity for normal windows. See the
@command{gravity} command.
-When called non-interactively with no arguments, the current setting is
-returned.
+When called with no arguments, the current setting is returned.
@end deffn
@deffn Command {set winliststyle} @var{setting}
@@ -361,7 +359,7 @@ The frame number the window is displayed in or a space if it is not in
a frame.
@end table
-When called non-interactively with no arguments, the current setting is
+When called with no arguments, the current setting is
returned.
@end deffn
@@ -379,7 +377,7 @@ omitted ratpoison defaults to the current window.
Set the default alignment for transient windows. See the
@command{gravity} command.
-When called non-interactively with no arguments, the current setting is
+When called with no arguments, the current setting is
returned.
@end deffn
@@ -388,7 +386,7 @@ returned.
Set the default alignment for windows with maxsize hints. See the
@command{gravity} command.
-When called non-interactively with no arguments, the current setting is
+When called with no arguments, the current setting is
returned.
@end deffn
@@ -396,7 +394,7 @@ returned.
@c @deffnx Command defborder @var{n}
Set the border width for all windows.
-When called non-interactively with no arguments, the current setting is
+When called with no arguments, the current setting is
returned.
@end deffn
@@ -459,7 +457,7 @@ matches any of the strings in the unmanaged window list will not be
handled in any way by ratpoison. This only applies to new windows (not
windows already managed by ratpoison).
-When called non-interactively with no arguments, the list is returned.
+When called with no arguments, the list is returned.
@end deffn
@node Rudeness, , Unmanaged Windows, Windows
@@ -507,7 +505,7 @@ raise requests and display requests you would type @samp{rudeness
request with a message like @samp{Raise request from window 1
(emacs)}.
-When called non-interactively with no arguments, the current setting is
+When called with no arguments, the current setting is
returned.
@end deffn
@@ -682,12 +680,14 @@ Abort and restore the frame to its original size.
@end table
The increment size used to resize the frame interactively is
-customized with the command @command{defresizeunit}.
+customized with the command @command{set resizeunit}.
@deffn Command {set resizeunit} @var{pixels}
@c @deffnx Command defresizeunit @var{pixels}
Set the number of pixels a frame will grow or shrink by when being
dynamically resized.
+
+When called with no arguments, the current setting is returned.
@end deffn
@deffn Command resize @var{horizontal} @var{vertical}
@@ -776,9 +776,7 @@ simple bindings in @file{doc/sample.ratpoisonrc} that allow you to
save and restore frame layouts with the press of a key.
@deffn Command fdump @var{screen-num}
-Dump the current frame layout as text. When used non-interactively
-(from the command-line), ratpoison will print the frame layout. When
-used interactively, nothing happens.
+Dump the current frame layout as text.
Without an argument the current screen's frames are dumped. With an
argument the @var{screen-num}th screen is dumped. @xref{Multiple Monitors}.
@@ -804,17 +802,19 @@ redo the last change that was undone.
@section Frame Numbering
Frames are normally numbered starting from 0. But this can be changed
-with @command{defframesels} to, for instance, include letters as well.
+with @command{set framesels} to, for instance, include letters as well.
@example
-defframesels abcdefghijklmnopqrstuvwxyz
+set framesels abcdefghijklmnopqrstuvwxyz
@end example
The above code will bind letters to frames instead of numbers.
-@deffn Command defframesels @var{order}
+@deffn Command set framesels @var{order}
Tell ratpoison what alphanumeric character to give each frame and in
what order.
+
+When called with no arguments, the current setting is returned.
@end deffn
@node Dedicated Frames, , Frame Numbering, Frames
@@ -1216,7 +1216,7 @@ customizations available for those rainy days.
@deffn Command msgwait @var{n}
Set the bar's timeout in seconds.
-When called non-interactively with no arguments, the current setting is
+When called with no arguments, the current setting is
returned.
@end deffn
@@ -1232,32 +1232,38 @@ Display @var{text} as a message.
@c @deffnx Command definputwidth @var{n}
Set the width of the input window.
-When called non-interactively with no arguments, the current setting is
+When called with no arguments, the current setting is
returned.
@end deffn
@deffn Command {set font} @var{font}
@c @deffnx Command deffont @var{font}
Set the font. @var{font} is a font string like @samp{9x15bold}.
+
+When called with no arguments, the current setting is returned.
@end deffn
@deffn Command {set fgcolor} @var{color}
@c @deffnx Command deffgcolor @var{color}
Set the foreground color for all text ratpoison displays. @var{color}
is any valid X11 color.
+
+When called with no arguments, the current setting is returned.
@end deffn
@deffn Command {set bgcolor} @var{color}
@c @deffnx Command defbgcolor @var{color}
Set the background color for all text ratpoison displays. @var{color}
is any valid X11 color.
+
+When called with no arguments, the current setting is returned.
@end deffn
@deffn Command {set barpadding} @var{x} @var{y}
@c @deffnx Command defbarpadding @var{x} @var{y}
Set the horizontal and vertical padding inside the bar.
-When called non-interactively with no arguments, the current setting is
+When called with no arguments, the current setting is
returned.
@end deffn
@@ -1265,7 +1271,7 @@ returned.
@c @deffnx Command defbargravity @var{g}
Set the default alignment for the message bar. See the @command{gravity} command.
-When called non-interactively with no arguments, the current setting is
+When called with no arguments, the current setting is
returned.
@end deffn
@@ -1273,6 +1279,8 @@ returned.
@deffn Command {set barborder} @var{n}
@c @deffnx Command defbarborder @var{n}
Set the border width for the bar window.
+
+When called with no arguments, the current setting is returned.
@end deffn
@@ -1442,8 +1450,14 @@ click the rat button down if @var{state} is @samp{down} or release the button if
@end deffn
@deffn Command redisplay
-Redisplay the current window. This is often used to fix xterms that
-didn't catch ratpoison's initial maximize event.
+Extend the current window to the whole size of its current frame and
+redisplay it. This can be used to:
+
+@itemize @bullet
+@item redisplay normal windows or bring transient windows to the full size of the frame as only normal windows are maximized by ratpoison.
+@item fix xterms that didn't catch ratpoison's initial maximize event.
+@end itemize
+
@end deffn
@deffn Command restart
@@ -1492,7 +1506,7 @@ Read a text file containing ratpoison commands.
Turn on or off the startup_message. This is most useful in your
.ratpoisonrc file. @var{state} can be @code{on} or @code{off}.
-When called non-interactively with no arguments, the current setting is
+When called with no arguments, the current setting is
returned.
@end deffn
diff --git a/src/actions.c b/src/actions.c
index ff4a5bf..15372be 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -209,7 +209,7 @@ init_user_commands()
"Name: ", arg_STRING);
add_command ("gnext", cmd_gnext, 0, 0, 0);
add_command ("gprev", cmd_gprev, 0, 0, 0);
- add_command ("gravity", cmd_gravity, 1, 0, 1,
+ add_command ("gravity", cmd_gravity, 1, 0, 0,
"Gravity: ", arg_GRAVITY);
add_command ("groups", cmd_groups, 0, 0, 0);
add_command ("gselect", cmd_gselect, 1, 1, 1,
@@ -3036,8 +3036,13 @@ cmd_rathold (int interactive, struct cmdarg **args)
cmdret *
cmd_curframe (int interactive, struct cmdarg **args)
{
- show_frame_indicator();
- return cmdret_new (RET_SUCCESS, NULL);
+ if (interactive)
+ {
+ show_frame_indicator();
+ return cmdret_new (RET_SUCCESS, NULL);
+ }
+ else
+ return cmdret_new(RET_SUCCESS, "%d", current_frame()->number);
}
/* Thanks to Martin Samuelsson <cosis@lysator.liu.se> for the
@@ -3379,11 +3384,8 @@ set_maxsizegravity (struct cmdarg **args)
cmdret *
cmd_msgwait (int interactive, struct cmdarg **args)
{
- if (args[0] == NULL && !interactive)
- return cmdret_new (RET_SUCCESS, "%d", defaults.bar_timeout);
-
if (args[0] == NULL)
- return cmdret_new (RET_FAILURE, "msgwait: one argument required");
+ return cmdret_new (RET_SUCCESS, "%d", defaults.bar_timeout);
if (ARG(0,number) < 0)
return cmdret_new (RET_FAILURE, "msgwait: invalid argument");
diff --git a/src/main.c b/src/main.c
index 7dd1f07..2cf6809 100644
--- a/src/main.c
+++ b/src/main.c
@@ -592,13 +592,9 @@ main (int argc, char *argv[])
/* Set ratpoison specific Atoms. */
rp_command = XInternAtom (dpy, "RP_COMMAND", False);
- PRINT_DEBUG (("RP_COMMAND = %ld\n", rp_command));
rp_command_request = XInternAtom (dpy, "RP_COMMAND_REQUEST", False);
- PRINT_DEBUG (("RP_COMMAND_REQUEST = %ld\n", rp_command_request));
rp_command_result = XInternAtom (dpy, "RP_COMMAND_RESULT", False);
- PRINT_DEBUG (("RP_COMMAND_RESULT = %ld\n", rp_command_result));
rp_selection = XInternAtom (dpy, "RP_SELECTION", False);
- PRINT_DEBUG (("RP_SELECTION = %ld\n", rp_selection));
if (cmd_count > 0)
{
diff --git a/src/number.c b/src/number.c
index 7fb48c9..ee96b42 100644
--- a/src/number.c
+++ b/src/number.c
@@ -71,12 +71,16 @@ numset_find_empty_cell (struct numset *ns)
int
numset_add_num (struct numset *ns, int n)
{
+ int ec;
+
PRINT_DEBUG(("ns=%p add_num %d\n", ns, n));
if (numset_num_is_taken (ns, n))
return 0; /* failed. */
-
- ns->numbers_taken[numset_find_empty_cell(ns)] = n;
+ /* numset_find_empty_cell calls realloc on numbers_taken. So store
+ the ret val in ec then use ec as an index into the array. */
+ ec = numset_find_empty_cell(ns);
+ ns->numbers_taken[ec] = n;
return 1; /* success! */
}
diff --git a/src/split.c b/src/split.c
index e481670..26231c7 100644
--- a/src/split.c
+++ b/src/split.c
@@ -85,8 +85,8 @@ cleanup_frame (rp_frame *frame)
#ifdef MAXSIZE_WINDOWS_ARE_TRANSIENTS
if (!win->transient
&& !(win->hints->flags & PMaxSize
- && win->hints->max_width < win->scr->width
- && win->hints->max_height < win->scr->height))
+ && (win->hints->max_width < win->scr->width
+ || win->hints->max_height < win->scr->height)))
#else
if (!win->transient)
#endif