From 6de1d7895d11250810988e7a7622cbaffbf9346f Mon Sep 17 00:00:00 2001 From: sabetts Date: Tue, 18 Mar 2003 04:07:09 +0000 Subject: mess up --- src/data.h | 20 +++----------------- src/split.c | 26 -------------------------- 2 files changed, 3 insertions(+), 43 deletions(-) (limited to 'src') diff --git a/src/data.h b/src/data.h index 9f0d2fd..e87d63e 100644 --- a/src/data.h +++ b/src/data.h @@ -106,8 +106,9 @@ struct screen_info char *display_string; - /* A tree of frame splits. */ - rp_split_tree *split_tree; + /* A list of frames that may or may not contain windows. There should + always be one in the list. */ + struct list_head rp_window_frames; /* Keep track of which numbers have been given to frames. */ struct numset *frames_numset; @@ -117,21 +118,6 @@ struct screen_info rp_window_frame *rp_current_frame; }; -rp_split_tree -{ - /* The width and height of this node. */ - int width, height; - - /* The frame occupying this split. If this is a leaf node, then - frame will not be a pointer to an actual frame, otherwise it'll - be NULL. */ - rp_window_frame *frame; - - /* A list of rp_split_tree children. By convention this list is - always has 0 or 2 elements in it. */ - struct list_head children; -} - struct rp_action { KeySym key; diff --git a/src/split.c b/src/split.c index 29cb1a9..b357f69 100644 --- a/src/split.c +++ b/src/split.c @@ -989,29 +989,3 @@ find_frame_number (screen_info *s, int num) return NULL; } -/* Frame split tree code. */ - -rp_frame_split * -find_frame_parent (screen_info *s, rp_window_frame *frame) -{ - return find_frame_parent_helper (s->split_tree, frame); -} - -rp_frame_split * -find_frame_parent_helper (rp_frame_split *split, rp_window_frame *frame) -{ - rp_frame_split *cur; - - if (split->frame == frame) - return split; - - /* Look for the frame in each child. If find_frame_parent_helper - returns not NULL, then we found it. */ - list_for_each_entry (cur, &split->children, node) - { - if (find_frame_parent_helper (cur, frame);) - return split; - } - - return NULL; -} -- cgit v1.2.3