summaryrefslogtreecommitdiff
path: root/src/split.h
AgeCommit message (Collapse)Author
2003-03-31* src/window.c (set_current_window): use current_frame()sabetts
* src/split.h (current_frame): new prototype * src/split.c (current_frame): new function (current_window): use current_frame() (split_frame): likewise (remove_all_splits): likewise (set_active_frame): likewise (show_frame_message): likewise (remove_all_splits): use current_screen() * src/actions.c (cmd_prev_frame): use current_frame() (cmd_next_frame): likewise (cmd_select): likewise (cmd_h_split): likewise (cmd_v_split): likewise (cmd_remove): likewise (cmd_shrink): likewise (cmd_resize): likewise (cmd_focusup): likewise (cmd_focusdown): likewise (cmd_focusleft): likewise (cmd_focusright): likewise
2003-03-26* src/split.h (show_frame_message): new prototypesabetts
* src/split.c (show_frame_message): new function * src/main.c (init_screen): listen for key release events in the key_window and input_window. * src/input.c (read_key): new argument, gobble_rel. All callers updated. * src/actions.c (cmd_remove): only remove the current frame if it isn't the ONLY one. (cmd_remove): display a message informing the user if the frame cannot be removed. (cmd_resize): clean up resize loop. (cmd_resize): display a window indicating which frame is being resized.
2003-03-07* src/Makefile.am (ratpoison_SOURCES): add frame.c and frame.hsabetts
* src/frame.h (frame_left): new prototype (frame_top): likewise (frame_right): likewise (frame_bottom): likewise (frame_width): likewise (frame_height): likewise (frame_resize_left): likewise (frame_resize_right): likewise (frame_resize_up): likewise (frame_resize_down): likewise (frame_move_left): likewise (frame_move_right): likewise (frame_move_up): likewise (frame_move_down): likewise * src/frame.c (frame_left): new function (frame_top): likewise (frame_right): likewise (frame_bottom): likewise (frame_width): likewise (frame_height): likewise (frame_resize_left): likewise (frame_resize_right): likewise (frame_resize_up): likewise (frame_resize_down): likewise (frame_move_left): likewise (frame_move_right): likewise (frame_move_up): likewise (frame_move_down): likewise * src/split.c (resize_frame): new function (resize_frame_right): likewise (resize_frame_left): likewise (resize_frame_top): likewise (resize_frame_bottom): likewise (resize_frame_horizontally): use resize_frame_right and resize_frame_left to do the resizing. (resize_frame_vertically): use resize_frame_top and resize_frame_bottom to do the resizing. * src/ratpoison.h (PRINT_ERROR): flush stdout (PRINT_DEBUG): likewise include frame.h
2003-03-07* src/split.h (find_frame_number): new prototypesabetts
* src/split.c (create_initial_frame): give a number to the initial frame (split_frame): give the new frame a unique number (split_frame): add the new frame after the current frame (remove_all_splits): return the frame's number when deleting it. (remove_frame): likewise (find_frame_number): new function * src/main.c (init_screen): initialize the frames_numset member (free_screen): free the frames_numset member * src/data.h (struct screen_info): new member, frames_numset * src/actions.h (cmd_fselect): new prototype * src/actions.c (user_commands): new command "fselect" (cmd_fselect): new function
2003-02-24* src/split.h (cleanup_frame): new protoypesabetts
* src/manage.c (scanwins): added better debugging output * src/events.c (cleanup_frame): move to split.c (handle_key): ungrab the rat right after we read the key. * src/actions.h (cmd_tmpwm): new prototype. * src/actions.c (spawn): return the pid of the child process. prototype updated. (cmd_tmpwm): new function (user_commands): new command, tmp_wm.
2003-02-10* src/split.h (num_frames): new prototypesabetts
(resize_shrink_to_window): likewise (resize_frame_vertically): likewise (resize_frame_horizontally): likewise * src/split.c (num_frames): no longer a static function (resize_shrink_to_window): new function (resize_frame_vertically): likewise (resize_frame_horizontally): likewise * src/main.c (init_defaults): init frame_resize_unit. * src/data.h (struct rp_defaults): new member frame_resize_unit. * src/conf.h (RESIZE_VGROW_KEY): new define (RESIZE_VGROW_MODIFIER): likewise (RESIZE_VSHRINK_KEY): likewise (RESIZE_VSHRINK_MODIFIER): likewise (RESIZE_HGROW_KEY): likewise (RESIZE_HGROW_MODIFIER): likewise (RESIZE_HSHRINK_KEY): likewise (RESIZE_HSHRINK_MODIFIER): likewise (RESIZE_SHRINK_TO_WINDOW_KEY): likewise (RESIZE_SHRINK_TO_WINDOW_MODIFIER): likewise (RESIZE_END_KEY): likewise (RESIZE_END_MODIFIER): likewise * src/actions.h (cmd_shrink): new prototype (cmd_resize): likewise (cmd_defresizeunit): likewise * src/actions.c (user_commands): add commands cmd_resize and cmd_shrink, and cmd_defresizeunit. (cmd_shrink): new function (cmd_resize): likewise (cmd_defresizeunit): likewise
2002-10-18* src/split.c (VERTICALLY): new definesabetts
(VERTICALLY): likewise (split_frame): new argument 'pixels'. The current frame is split and resized to 'pixels' pixels. (v_split_frame): new argument 'pixels'. prototype updated. (h_split_frame): likewise * src/actions.c (user_commands): hsplit, vsplit, and split take a string argument. (read_split): new function (cmd_h_split): takes a ratio or number to determine how big the frame split will be. (cmd_v_split): likewise
2002-02-08* src/split.h (find_last_frame): prototype now correctly reflectssabetts
the actual function. * src/events.c (configure_notify): ignore substructurenotify events. Add more debugging statements. * src/actions.c (cmd_focuslast): pass the current screen to the call to find_last_frame.
2001-12-09* src/events.c (handle_key): revert the focus immediately aftersabetts
reading the key. * src/list.c (give_window_focus): update rp_current_frame when setting the window focus. * src/main.c (main): scan for windows in a seperate pass after initializing the screen structures. (init_screen): build a display string for each screen. (init_screen): remove the call to scanwins. * src/manage.c (current_screen): return the current screen using rp_current_screen. * src/split.h (init_frame_lists): new function * src/split.c (rp_window_frame_sentinel): remove. (rp_current_frame): remove. (frames_screen): new function (maximize_frame): use the frame's screen to find out the width and height of the display. (create_initial_frame): take a pointer to a screen_info as an argument. (init_frame_lists): new function (init_frame_list): take a pointer to a screen_info as an argument. (find_last_frame): take a pointer to a screen_info as an argument. * src/actions.c (spawn): Set the DISPLAY environment variable to point to the current screen. * src/data.h (struct screen_info): add display_string, rp_window_frame_sentinel, rp_current_frame. (rp_current_screen): new global (rp_current_frame): Remove. Dependant code uses screen_info.rp_current_frame.
2001-10-18* src/split.h (find_last_frame): new prototypesabetts
* src/split.c (update_last_access): new function (find_last_frame): likewise (split_frame): update the new frame's last_access field (set_active_frame): update the new current frame's last_access field * src/input.h (x11_mask_to_rp_mask): new prototype (rp_mask_to_x11_mask): likewise * src/input.c (x11_mask_to_rp_mask): new function (rp_mask_to_x11_mask): likewise * src/events.c (handle_key): convert X11 modifier masks to rp modifier masks where appropriate. * src/actions.h (cmd_focuslast): new prototype * src/actions.c (initialize_default_keybindings): new keybinding for "focuslast" (cmd_focuslast): new function (user_command): new command "focuslast"
2001-09-21* src/split.h (find_frame_up): new prototypesabetts
(find_frame_down): likewise (find_frame_left): likewise (find_frame_right): likewise * src/split.c (find_frame_up): new function (find_frame_down): likewise (find_frame_left): likewise (find_frame_right): likewise * src/manage.c (move_window): use x11 gravity constants to denote gravity. * src/main.c (ratpoison_longopts): remove --kill and --restart. Dependant code updated. (init_defaults): use x11 gravity constants to denote gravity. (main): only display the startup message if defaults.startup_message is on. * src/list.c (update_window_gravity): rename from update_window_position. dependant code updated * src/events.c (client_msg): don't test for restart or kill client messages. (client_msg): properly handle iconify requests. (get_event): kill and restart the process here. * src/data.h (TOP_LEFT): remove define (TOP_CENTER): likewise (TOP_RIGHT): likewise (CENTER_LEFT): likewise (CENTER_CENTER): likewise (CENTER_RIGHT): likewise (BOTTOM_LEFT): likewise (BOTTOM_CENTER): likewise (BOTTOM_RIGHT): likewise (struct rp_window): rename field to position to gravity. (struct rp_defaults): rename win_pos to win_gravity, trans_pos to trans_gravity and maxsize_pos to maxsize_gravity. (rp_restart): remove global variable (rp_kill): likewise * src/communications.h (send_kill): remove prototype (send_restart): likewise * src/communications.c (send_restart): remove function. obsolete. (send_kill): likewise * src/bar.c (bar_x): Use X11 gravity constants to denote location. (bar_y): likewise * src/actions.h (cmd_focusup): new prototype (cmd_focusdown): likewise (cmd_focusleft): likewise (cmd_focusright): likewise (cmd_startup_message): likewise (cmd_restart): likewise * src/actions.c (cmd_quit): just set the kill_signalled variable. (parse_wingravity): use compass directions to describe the gravity (parse_wingravity): renamed from parse_winpos. dependant code updated. (cmd_gravity): renamed from cmd_pos. dependant code updated. (cmd_defwingravity): renamed from cmd_defwinpos. dependant code updated. (cmd_deftransgravity): renamed from cmd_deftranspos. dependant code updated. (cmd_defmaxsizegravity): renamed from cmd_defmaxsizepos. dependant code updated. (cmd_focusup): new function (cmd_focusdown): likewise (cmd_focusleft): likewise (cmd_focusright): likewise (cmd_restart): likewise (cmd_startup_message): likewise (user_commands): new commands "focusup" "focusdown" "focusright" "focusleft" "startup_message" "restart".
2001-08-23new code to handle transient windowssabetts
2001-04-13* src/split.h (blank_frame): new prototypesabetts
* src/split.c (split_frame): calls unhide_window after maximizing the new frame's window. (remove_all_splits): hide all windows but the current one (remove_all_splits): maximize the current window in its newly resized frame. (remove_frame): hide the frame's window after removing it from the list. (blank_frame): new function * src/manage.h (withdraw_window): new prototype (hide_window): likewise (unhide_window): likewise * src/manage.c (scanwins): glob ignored windows into 1 if statement. (scanwins): set the window's state to NormalState before calling map_window. (set_state): sets win->state (map_window): calls set_state (hide_window): new function (unhide_window): likewise (withdraw_window): new function * src/main.c (main): setup error handlers after --command, --restart, and --kill commands have been processed. (main): doesn't call set_active_window (init_screen): XSync's after selecting ewents on the root window. (clean_up): map iconized windows * src/list.h (give_window_focus): prototype updated * src/list.c (give_window_focus): takes a second argument, last_win. (give_window_focus): calls unhide_window (give_window_focus): uses last_win instead of current_window() (set_active_window): hides the last window and unhides the new window. (set_active_window): calls give_window_focus * src/events.c (cleanup_frame): maximizes the frame's new window (unmap_notify): do nothing if the window is in the iconic state. Withdraw the window if it is in the normal state. (map_request): calls unhide_window if the window is iconized. Do nothing if it is already mapped. (destroy_window): tightened up (client_msg): detects iconize requests from clients. * src/data.h (STATE_UNMAPPED): remove. Dependant code uses WithdawnState in its stead. (STATE_MAPPED): likewise. Dependant code uses NormalState in its stead * src/actions.c (initialize_default_keybindings): new keybinding - bound to "select -" (cmd_select): the string "-" selects a blank window
2001-04-07* src/split.h (hide_frame_indicator): new prototypesabetts
(show_frame_indicator): likewise * src/split.c: include <unistd.h> (split_frame): set the new_frame's window to NULL (split_frame): calls show_frame_indicator once the split is done. (set_active_frame): only call show_frame_indicator if the frame has no window or if we switched to a different frame. (update_frame_indicator): prints FRAME_STRING in the frame indicator window. (hide_frame_indicator): new function (show_frame_indicator): likewise * src/main.c (rp_rat_bits): new variable (rp_rat_mask_bits): likewise (alrm_handler): calls hide_frame_indicator (init_rat_cursor): new function (init_screen): calls init_rat_cursor * src/events.c (unmap_notify): calls set_active_frame if the window being unmapped was in the current frame (destroy_window): calls set_active_frame if the window being destroyed was in the current frame (grab_rat): new function (grab_rat): likewise (handle_key): calls grab_rat and ungrab_rat * src/data.h (struct screen_info): new variable rat * src/conf.h (FRAME_INDICATOR_TIMEOUT): new #define (FRAME_STRING): likewise (RAT_HEIGHT): likewise (RAT_WIDTH): likewise (RAT_HOT_X): likewise (RAT_HOT_Y): likewise * src/actions.h (cmd_curframe): new prototype * src/actions.c (initialize_default_keybindings): new key binds for "curframe" (user_commands): new command "curframe" (cmd_curframe): new function * 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. (num_frames): comment out (remove_frame): remove special case when there is only 1 frame left. * src/split.h (h_split_frame): renamed frome h_split_window (v_split_frame): renamed frome v_split_window (split_frame): renamed frome split_window (remove_all_splits): renamed frome remove_all_frames (find_windows_frame): new prototype (find_frame_next): likewise (find_frame_prev): likewise (current_window): likewise (init_frame_list): likewise (set_active_frame): likewise * src/split.c (create_initial_frame): new function (init_frame_list): likewise (find_windows_frame): likewise (find_frame_next): likewise (find_frame_prev): likewise (current_window): likewise (update_frame_indicator): likewise (set_active_frame): likewise (split_frame): rename from split_window (v_split_frame): rename from v_split_window (h_split_frame): rename from h_split_window (remove_all_splits): renamed frome remove_all_frames (total_frame_area): traverses rp_window_frame list (num_frames): likewise (frame_overlaps): likewise (remove_frame): likewise (remove_frame): calls delete_frame_from_list * src/main.c (main): calls init_frame_list (init_screen): create and map the frame_window * src/events.c (new_window): the screen's frame_window is not managed (cleanup_frame): new function (unmap_notify): calls cleanup_frame if window exists in a frame (destroy_window): likewise * src/data.h (struct screen_info): remove frame field (struct rp_window_frame): new fields win, prev, next (rp_window_frame_sentinel): new global * src/actions.c (cmd_prev): jumps to last accessed window if current frame is empty. (cmd_next): likewise (cmd_remove): nothing is done if only 1 frame exists * src/data.h (struct screen_info): new field frame_window (rp_current_frame): new global (rp_current_window): removed. All dependant code updated.
2001-04-06* src/split.h (h_split_frame): renamed frome h_split_windowsabetts
(v_split_frame): renamed frome v_split_window (split_frame): renamed frome split_window (remove_all_splits): renamed frome remove_all_frames (find_windows_frame): new prototype (find_frame_next): likewise (find_frame_prev): likewise (current_window): likewise (init_frame_list): likewise (set_active_frame): likewise * src/split.c (create_initial_frame): new function (init_frame_list): likewise (find_windows_frame): likewise (find_frame_next): likewise (find_frame_prev): likewise (current_window): likewise (update_frame_indicator): likewise (set_active_frame): likewise (split_frame): rename from split_window (v_split_frame): rename from v_split_window (h_split_frame): rename from h_split_window (remove_all_splits): renamed frome remove_all_frames (total_frame_area): traverses rp_window_frame list (num_frames): likewise (frame_overlaps): likewise (remove_frame): likewise (remove_frame): calls delete_frame_from_list * src/manage.c (scanwins): skips the frame_window (maximize_transient): finds the window's frame (maximize_normal): likewise * src/main.c (main): calls init_frame_list (init_screen): create and map the frame_window * src/list.c (give_window_focus): new function (goto_window): likewise (set_active_window): calls give_window_focus * src/list.h (give_window_focus): new prototype (goto_window): likewise * src/events.c (new_window): the screen's frame_window is not managed (cleanup_frame): new function (unmap_notify): calls cleanup_frame if window exists in a frame (destroy_window): likewise * src/data.h (struct screen_info): remove frame field (struct rp_window_frame): new fields win, prev, next (rp_window_frame_sentinel): new global * src/actions.c (cmd_prev): jumps to last accessed window if current frame is empty. (cmd_next): likewise (cmd_remove): nothing is done if only 1 frame exists * src/data.h (struct screen_info): new field frame_window (rp_current_frame): new global (rp_current_window): removed. All dependant code updated.
2001-04-01* src/split.h (find_window_for_frame): new function prototypesabetts
(find_window_for_frame): likewise (find_window_for_frame): likewise (find_window_for_frame): likewise (find_window_for_frame): likewise * src/split.c (window_fits_in_frame): new function (find_window_for_frame): likewise (split_window): likewise (v_split_window): likewise (h_split_window): likewise (remove_all_frames): likewise (frame_is_below): likewise (frame_is_above): likewise (frame_is_left): likewise (frame_is_right): likewise (total_frame_area): likewise (num_frames): likewise (frames_overlap): likewise (frame_overlaps): likewise (remove_frame): likewise * src/ratpoison.h: includes "split.h" * src/manage.c (unmanage): calls free_window (maximize_transient): takes the window's frame into account (maximize_normal): likewise * src/list.h (find_window_prev_with_frame): new function prototype (find_window_next_with_frame): likewise (free_window): likewise * src/list.c (free_window): new function (add_to_window_list): initialize new window's frame to NULL. (find_window_prev): skips windows with frames (find_window_next): likewise (find_window_other): likewise (find_window_prev_with_frame): new function (find_window_next_with_frame): new function (set_active_window): returns if the specified window is already the current window. (set_active_window): If the new window has no frame it inherits the current window's frame. (set_active_window): maximize and raise the newly active window. * src/events.c (unmap_notify): handles window frames. (destroy_window): simplified * src/data.h (struct rp_window_frame): new struct (struct rp_window): add frame variable * src/conf.h (WINDOW_BORDER_WIDTH): set to 1 * src/actions.h (cmd_next_frame): new function prototype (cmd_prev_frame): likewise (cmd_h_split): likewise (cmd_v_split): likewise (cmd_only): likewise (cmd_remove): likewise * src/actions.c (initialize_default_keybindings): new default bindings for "split", "vsplit", "focus", "only", "remove" (user_commands): new user commands "split", "vsplit", "focus", "only", "remove" (cmd_prev_frame): new function (cmd_next_frame): likewise (cmd_h_split): likewise (cmd_v_split): likewise (cmd_only): likewise (cmd_remove): likewise * src/Makefile.am (ratpoison_SOURCES): new files split.c split.h