summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog11
-rw-r--r--src/actions.c6
-rw-r--r--src/split.c10
3 files changed, 18 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 9d31cae..6f32688 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
2001-04-06 shawn <sabetts@diggin.lamenet.tmp>
+ * src/split.c (remove_all_splits): only maximize the current
+ window if there is one.
+ (maximize_frame): remove unused code to retrieve the current
+ screen_info.
+
+ * src/actions.c (cmd_h_split): calls h_split_frame on the current
+ frame.
+ (cmd_v_split): likewise
+ (cmd_only): even if the current frame is empty, call
+ remove_all_splits.
+
* src/split.c (maximize_frame): new function
(create_initial_frame): calls maximize_frame to fill in the
initial frame's fields.
diff --git a/src/actions.c b/src/actions.c
index ced4c8e..b33941e 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -817,20 +817,18 @@ cmd_echo (void *data)
void
cmd_h_split (void *data)
{
- h_split_frame (find_windows_frame (current_window()));
+ h_split_frame (rp_current_frame);
}
void
cmd_v_split (void *data)
{
- v_split_frame (find_windows_frame (current_window()));
+ v_split_frame (rp_current_frame);
}
void
cmd_only (void *data)
{
- if (!current_window()) return;
-
remove_all_splits();
maximize (current_window());
}
diff --git a/src/split.c b/src/split.c
index e2ec89c..a257921 100644
--- a/src/split.c
+++ b/src/split.c
@@ -37,9 +37,6 @@ delete_frame_from_list (rp_window_frame *frame)
static void
maximize_frame (rp_window_frame *frame)
{
- screen_info *s;
- s = current_screen();
-
frame->x = PADDING_LEFT;
frame->y = PADDING_TOP;
@@ -280,8 +277,11 @@ remove_all_splits ()
create_initial_frame ();
rp_current_frame->win = cur_window;
- maximize (cur_window);
- XRaiseWindow (dpy, cur_window->w);
+ if (cur_window)
+ {
+ maximize (cur_window);
+ XRaiseWindow (dpy, cur_window->w);
+ }
}
static int