diff options
-rw-r--r-- | ChangeLog | 456 | ||||
-rw-r--r-- | NEWS | 6 | ||||
-rw-r--r-- | src/conf.h | 5 | ||||
-rw-r--r-- | src/manage.c | 25 |
4 files changed, 263 insertions, 229 deletions
@@ -1,3 +1,21 @@ +2001-03-13 shawn <sabetts@diggin.lamenet.tmp> + + * src/conf.h: replaced the silly c++ style comment around + HIDE_MOUSE with a REAL comment. + + * src/manage.c (update_window_information): updates the window's + border width. + + * src/conf.h (WINDOW_BORDER_WIDTH): new constant + + * src/manage.c (maximize_normal): Set the border width to + WINDOW_BORDER_WIDTH. takes the border width into account when + calculating the position, width, and height. + (maximize_transient): likewise + (maximize): calls XSetWindowBorderWidth to set the window's border + width. + (force_maximize): likewise + 2001-03-07 shawn <sabetts@diggin.lamenet.tmp> * doc/Makefile.am (EXTRA_DIST): Added sample.ratpoisonrc and @@ -9,20 +27,20 @@ 2001-03-07 Ryan Yeske <rcyeske@cut.hotdog.tmp> - * actions.c (string_to_keysym): New function. + * src/actions.c (string_to_keysym): New function. (parse_keydesc): Call string_to_keysym. - * main.c (read_startup_files): Use PRINT_DEBUG to report failure + * src/main.c (read_startup_files): Use PRINT_DEBUG to report failure to load rc files. - * main.c (read_rc_file): Check for comment character '#' in first + * src/main.c (read_rc_file): Check for comment character '#' in first column. (read_rc_file): Fix typo that was resulting in exhausting virtual memory when parsing rc files. 2001-03-06 shawn <sabetts@diggin.lamenet.tmp> - * input.c (init_modifier_map): rp_modifier_info masks are or'd + * src/input.c (init_modifier_map): rp_modifier_info masks are or'd with existing value. (init_modifier_map): Resolves alt-meta conficts just like emacs. (cook_keycode): returns a KeySym string. Updated Dependant code. @@ -30,32 +48,32 @@ (get_more_input): copies the KeySym string passed back from read_key into the input buffer. - * data.h (struct modifier_info): commented out + * src/data.h (struct modifier_info): commented out mode_switch_mask. Dependant code commented out. - * actions.c (cmd_select): the search is not carried out on empty + * src/actions.c (cmd_select): the search is not carried out on empty strings. - * events.c (configure_request): Handles restacking requests. + * src/events.c (configure_request): Handles restacking requests. - * main.c: removed rp_mode_switch and rp_numlock. Added + * src/main.c: removed rp_mode_switch and rp_numlock. Added rp_modifier_info global. (main): calls init_modifier_map. (init_screen): windows no longer select on KeyRelease and KeymapState events. - * input.h (init_modifier_map): new prototype + * src/input.h (init_modifier_map): new prototype - * input.c (init_modifier_map): new function + * src/input.c (init_modifier_map): new function (cook_keycode): uses rp_modifier_info to get Mode_switch modifier mask. (read_key): only listens for key presses. - * events.c (keymap_state): removed function + * src/events.c (keymap_state): removed function (key_release): likewise (delegate_event): removed case for KeymapNotify. - * data.h (struct modifier_info): added mode_switch_mask, removed + * src/data.h (struct modifier_info): added mode_switch_mask, removed shift_lock_mask. removed rp_mode_switch, and rp_numlock. dependant code updated. @@ -65,36 +83,36 @@ 2001-03-05 Ryan Yeske <rcyeske@cut.hotdog.tmp> - * actions.c: remove silly C,M,A,S,H #defines and propagate + * src/actions.c: remove silly C,M,A,S,H #defines and propagate changes. - * bar.c (update_window_names): Print a '+' for the last accessed + * src/bar.c (update_window_names): Print a '+' for the last accessed window. 2001-03-05 shawn <sabetts@diggin.lamenet.tmp> - * events.c (key_press): set rp_mode_switch to 0 before processing + * src/events.c (key_press): set rp_mode_switch to 0 before processing the key. - * main.c: new globals rp_mode_switch, rp_numlock. + * src/main.c: new globals rp_mode_switch, rp_numlock. (init_screen): selects on KeyRelease events for the root window, input_window, and key_window. (init_screen): selects on KeymapState events for input_window and key_window. - * input.c (cook_keycode): Handles Mode_switch (aka AltGr). + * src/input.c (cook_keycode): Handles Mode_switch (aka AltGr). (read_key): listens for KeyRelease and KeymapState events. (read_key): updates rp_mode_switch status - * events.h (keymap_state): new prototype + * src/events.h (keymap_state): new prototype - * events.c (keymap_state): new function + * src/events.c (keymap_state): new function (key_release): new function (key_press): uses cook_keycode to get the event's keysym. (key_press): updates rp_mode_switch status (delegate_event): handles KeymapNotify events. - * data.h (struct modifier_info): new struct + * src/data.h (struct modifier_info): new struct new globals rp_mode_switch and rp_numlock. 2001-03-04 shawn <sabetts@diggin.lamenet.tmp> @@ -113,12 +131,12 @@ 2001-03-03 Ryan Yeske <rcyeske@cut.hotdog.tmp> - * actions.c (cmd_bind): Do not pollute the message bar with + * src/actions.c (cmd_bind): Do not pollute the message bar with chatter about the keybinding. 2001-03-03 shawn <sabetts@livingston> - * manage.c (maximize_normal): windows with resize increments + * src/manage.c (maximize_normal): windows with resize increments resize properly when their original size is > the screen size. (maximize_transient): likewise @@ -141,9 +159,9 @@ 2001-03-02 shawn <sabetts@diggin.lamenet.tmp> - * main.c (print_version): updated copyright notice. + * src/main.c (print_version): updated copyright notice. - * actions.c (initialize_default_keybindings): removed emacs + * src/actions.c (initialize_default_keybindings): removed emacs binding. 2001-03-01 shawn <sabetts@diggin.lamenet.tmp> @@ -153,28 +171,28 @@ 2001-03-01 Ryan Yeske <rcyeske@cut.hotdog.tmp> - * ratpoison.h (xmalloc, xrealloc, fatal): Prototype. + * src/ratpoison.h (xmalloc, xrealloc, fatal): Prototype. - * main.c (xmalloc): Move here from sbuf.c. + * src/main.c (xmalloc): Move here from sbuf.c. (xrealloc): Likewise. (fatal): Likewise. - * number.c (find_empty_cell): Use xrealloc, remove error check. + * src/number.c (find_empty_cell): Use xrealloc, remove error check. (init_numbers): Likewise. - * manage.c (get_window_name): Likewise. + * src/manage.c (get_window_name): Likewise. - * main.c (main): Likewise. + * src/main.c (main): Likewise. - * list.c (add_to_window_list): Likewise. + * src/list.c (add_to_window_list): Likewise. (add_to_window_list): Likewise. - * events.c (handle_key): Likewise. + * src/events.c (handle_key): Likewise. - * input.c (keysym_to_string): Likewise. + * src/input.c (keysym_to_string): Likewise. (get_more_input): Use xrealloc, remove error check. - * actions.c (cmd_source): Open the file. Error report as + * src/actions.c (cmd_source): Open the file. Error report as appropriate. (cmd_windows): Call current_screen() to find the current screen. (cmd_clock): Show the clock even if no windows are open. @@ -185,23 +203,23 @@ (add_keybinding): Use xrealloc. (replace_keybinding): Use xrealloc. - * main.c (read_rc_file): Take a file pointer rather than a + * src/main.c (read_rc_file): Take a file pointer rather than a filename. (read_startup_files): If ~/.ratpoisonrc is not readable try /etc/ratpoisonrc. - * actions.c: Use PRINT_DEBUG instead of fprintf. Put useful error + * src/actions.c: Use PRINT_DEBUG instead of fprintf. Put useful error text in calls to message(). (cmd_select): Show the window list if there is no such window number. 2001-02-28 shawn <sabetts@badbox.secure.basis.org> - * manage.c (map_window): calls update_window_information. + * src/manage.c (map_window): calls update_window_information. - * manage.h (map_window): new prototype. + * src/manage.h (map_window): new prototype. - * events.c (new_window): calls update_window_information on new windows. + * src/events.c (new_window): calls update_window_information on new windows. (map_request): calls map_window on managed unmapped windows. (configure_request): removed commented out old crusty code. Updates window's structure based on what bits are set in the @@ -210,7 +228,7 @@ (property_notify): doesn't call maximize when WM_NORMAL_HINTS are updated. - * manage.c (manage): no longer maps the window, this code is in + * src/manage.c (manage): no longer maps the window, this code is in map_window. (map_window): new function (maximize): no longer sends a synthetic configure event. @@ -224,58 +242,58 @@ 2001-02-27 shawn <sabetts@diggin.lamenet.tmp> - * actions.c (cmd_escape): updates the "other" command keybinding + * src/actions.c (cmd_escape): updates the "other" command keybinding - * manage.h (ungrab_prefix_key): new prototype + * src/manage.h (ungrab_prefix_key): new prototype (grab_prefix_key): likewise - * manage.c (ungrab_prefix_key): new function + * src/manage.c (ungrab_prefix_key): new function - * main.c (main): calls initialize_default_keybindings after + * src/main.c (main): calls initialize_default_keybindings after init_window_list. - * data.h (struct rp_action): key is of type KeySym. state is + * src/data.h (struct rp_action): key is of type KeySym. state is unsigned int. - * conf.h (KEY_PREFIX): set to XK_t + * src/conf.h (KEY_PREFIX): set to XK_t - * actions.h (cmd_escape): new prototype + * src/actions.h (cmd_escape): new prototype - * actions.c (cmd_escape): new function + * src/actions.c (cmd_escape): new function - * data.h (struct key): move from actions.h + * src/data.h (struct key): move from actions.h (struct rp_key): rename from struct key. dependant code updated. (prefix_key): new global variable. code dependant on KEY_PREFIX and MODIFIER_PREFIX updated to use this. - * actions.c: "maximize" user command calls cmd_maximize + * src/actions.c: "maximize" user command calls cmd_maximize (initialize_default_keybindings): initializes prefix_key. Added "escape" command. - * manage.c (force_maximize): moved from actions.c + * src/manage.c (force_maximize): moved from actions.c (maximize): likewise (maximize_normal): likewise (maximize_transient): likewise - * actions.c (cmd_maximize): New function + * src/actions.c (cmd_maximize): New function - * main.c (handler): Prepends error message with "ERROR: ". + * src/main.c (handler): Prepends error message with "ERROR: ". Displays error in message bar. Returns 0. - * events.c (destroy_window): sets rp_current_window to NULL when + * src/events.c (destroy_window): sets rp_current_window to NULL when there are no more mapped windows. (destroy_window): calls set_current_window and find_window_other directly instead of cmd_other. 2001-02-26 shawn <sabetts@diggin.lamenet.tmp> - * list.c (save_mouse_position): stores the mouse position relative + * src/list.c (save_mouse_position): stores the mouse position relative to the root window. (set_active_window): warps the mouse relative to the root window. - * actions.h: prototype for force_maximize added + * src/actions.h: prototype for force_maximize added - * actions.c: the user command "maximize" calls force_maximize + * src/actions.c: the user command "maximize" calls force_maximize (force_maximize): New function 2001-02-25 shawn <sabetts@diggin.lamenet.tmp> @@ -286,11 +304,11 @@ 2001-02-25 Ryan Yeske <rcyeske@cut.hotdog.tmp> - * main.c (read_rc_file): rename from load_rc_file. Remove static + * src/main.c (read_rc_file): rename from load_rc_file. Remove static keyword. (read_startup_files): rename from read_initialization_files. - * actions.c (cmd_prev): Handle situation when there is no other + * src/actions.c (cmd_prev): Handle situation when there is no other window. (cmd_next): Likewise. (cmd_other): Likewise. @@ -298,29 +316,29 @@ 2001-02-24 Ryan Yeske <rcyeske@cut.hotdog.tmp> - * main.c (load_rc_file): new function + * src/main.c (load_rc_file): new function (read_initialization_files): new function (main): read the initialization files - * conf.h: remove themes support + * src/conf.h: remove themes support - * themes.h: remove file + * src/themes.h: remove file - * actions.c (replace_keybinding): add function + * src/actions.c (replace_keybinding): add function (cmd_bind): handle binding of previously bound key 2001-02-23 shawn <sabetts@diggin.lamenet.tmp> - * main.c (main): passes return value of find_window_other() to + * src/main.c (main): passes return value of find_window_other() to set_active_window(). - * list.h (remove_from_window_list): removed prototype + * src/list.h (remove_from_window_list): removed prototype (find_window_in_list): new prototype (append_to_list): likewise (insert_into_list): likewise (remove_from_list): likewise - * list.c: propogated use of rp_unmapped_window_sentinel and + * src/list.c: propogated use of rp_unmapped_window_sentinel and rp_mapped_window_sentinel. (find_window_in_list): new function (find_window): calls find_window_in_list to search mapped and @@ -334,15 +352,15 @@ (insert_into_list): new function (remove_from_list): new function - * events.c (unmap_notify): Searches only the mapped window + * src/events.c (unmap_notify): Searches only the mapped window list. moves the window from the unmapped window list to the mapped window list. - * data.h: removed rp_window_head and rp_window_tail, updated + * src/data.h: removed rp_window_head and rp_window_tail, updated dependant files. Added rp_mapped_window_sentinel and rp_unmapped_window_sentinel globals. - * bar.c (update_window_names): loops only through mapped window + * src/bar.c (update_window_names): loops only through mapped window list. 2001-02-21 Ryan Yeske <rcyeske@cut.hotdog.tmp> @@ -351,22 +369,22 @@ 2001-02-21 Ryan Yeske <rcyeske@cut.hotdog.tmp> - * manage.c (manage): comment out broken sort_window_list_by_number + * src/manage.c (manage): comment out broken sort_window_list_by_number call - * actions.h (key): new structure + * src/actions.h (key): new structure - * actions.c (find_keybinding): return an rp_action*, not a char* + * src/actions.c (find_keybinding): return an rp_action*, not a char* (user_commands): add bind command (parse_keydesc): new function (cmd_bind): new function - * actions.h: update find_keybinding prototype + * src/actions.h: update find_keybinding prototype - * events.c (handle_key): handle new return value of + * src/events.c (handle_key): handle new return value of find_keybinding - * actions.c (cmd_generate): Send the modifier prefix state as well + * src/actions.c (cmd_generate): Send the modifier prefix state as well as the keycode. (find_keybinding): Do not strdup the key action data. (add_keybinding): Strdup the key action data. @@ -377,33 +395,33 @@ 2001-02-19 Ryan Yeske <rcyeske@cut.hotdog.tmp> - * events.c (handle_key): Call find_keybinding() instead of looping + * src/events.c (handle_key): Call find_keybinding() instead of looping through keytable here. - * main.c (main): Call initialize_default_keybindings. + * src/main.c (main): Call initialize_default_keybindings. - * actions.c (find_keybinding): Added. + * src/actions.c (find_keybinding): Added. (add_keybinding): Added. (initialize_default_keybindings): Added. Do not use static table of keybindings. Instead call add_keybinding() for each key. - * Makefile.am (ratpoison_SOURCES): add themes.h + * src/Makefile.am (ratpoison_SOURCES): add themes.h - * main.c (FONT_NAME): Rename to FONT + * src/main.c (FONT_NAME): Rename to FONT (BAR_BG_COLOR): Rename to BACKGROUND (BAR_FG_COLOR): Rename to FOREGROUND - * list.c (find_window_by_number): Rename to find_window_number. + * src/list.c (find_window_by_number): Rename to find_window_number. (find_window_by_name): Rename to find_window_name. (goto_window_name): Remove. (find_window_prev): Clean up. (find_window_next): Clean up. - * list.h: Update prototypes. + * src/list.h: Update prototypes. - * conf.h: Include "themes.h". + * src/conf.h: Include "themes.h". - * actions.c (cmd_generate): Fix typo. + * src/actions.c (cmd_generate): Fix typo. (prev_window): Remove. (next_window): Remove. (last_window): Remove. @@ -433,39 +451,39 @@ (abort_keypress): Remove. (cmd_abort): Add. - * actions.c: Make :select command handle numbers. + * src/actions.c: Make :select command handle numbers. (cmd_unimplemented): new function. Commands are all cmd_ prefixed. Major changes within this file. - * input.c (get_more_input): New function. Used to collect input + * src/input.c (get_more_input): New function. Used to collect input on top of some existing input. (get_input): Calls get_more_input to do work. - * conf.h (THEME): added themes support. + * src/conf.h (THEME): added themes support. - * bar.h (message): New macro. Calls marked_message with (0, 0) + * src/bar.h (message): New macro. Calls marked_message with (0, 0) highlight parameters. - * bar.c (marked_message): New function + * src/bar.c (marked_message): New function - * actions.h: Update prototypes. + * src/actions.h: Update prototypes. 2001-02-19 shawn <sabetts@diggin.lamenet.tmp> - * manage.c (manage): calls sort_window_list_by_number + * src/manage.c (manage): calls sort_window_list_by_number - * list.h (sort_window_list_by_number): Added prototype + * src/list.h (sort_window_list_by_number): Added prototype - * list.c (swap_list_elements): Added + * src/list.c (swap_list_elements): Added (sort_window_list_by_number): Added - * input.c (update_input_window): Added + * src/input.c (update_input_window): Added (get_input): calls update_input_window in place of xlib calls. (get_input): exits if realloc fails - * conf.h: Added INPUT_WINDOW_SIZE + * src/conf.h: Added INPUT_WINDOW_SIZE - * bar.c (update_window_names): loops through window list from head + * src/bar.c (update_window_names): loops through window list from head to tail. 2001-02-18 Gergely Nagy <8@free.bsd.hu> @@ -474,9 +492,9 @@ 2001-02-18 shawn <sabetts@diggin.lamenet.tmp> - * conf.h: restructured comments. Added #define for AUTO_CLOSE. + * src/conf.h: restructured comments. Added #define for AUTO_CLOSE. - * manage.c (unmanage): kills ratpoison when there are no more + * src/manage.c (unmanage): kills ratpoison when there are no more windows. 2001-02-17 Ryan Yeske <rcyeske@cut.hotdog.tmp> @@ -493,25 +511,25 @@ 2001-02-17 Ryan Yeske <rcyeske@cut.hotdog.tmp> - * actions.c (generate_key_event): Send KEY_PREFIX. + * src/actions.c (generate_key_event): Send KEY_PREFIX. 2001-02-17 Ryan Yeske <rcyeske@cut.hotdog.tmp> - * manage.c (current_screen): Rename get_screen() and move to this + * src/manage.c (current_screen): Rename get_screen() and move to this file. - * input.c (get_input): Remove screen_info as paramater. Call + * src/input.c (get_input): Remove screen_info as paramater. Call current_screen() to get screen_info. - * actions.c (get_screen): Remove. + * src/actions.c (get_screen): Remove. 2001-02-17 Gergely Nagy <8@free.bsd.hu> - * actions.c (goto_window_by_name, rename_current_window, command) + * src/actions.c (goto_window_by_name, rename_current_window, command) (shell_command, switch_to, xterm_command): changed static char[100]s to dynamic char *s, as get_input() now supports this - * input.h: reflect get_input change - * input.c (get_input): use dynamically allocated strings + * src/input.h: reflect get_input change + * src/input.c (get_input): use dynamically allocated strings 2001-02-15 Gergely Nagy <8@free.bsd.hu> @@ -539,63 +557,63 @@ 2001-02-15 Gergely Nagy <8@free.bsd.hu> - * getopt.c: fixed a warning + * src/getopt.c: fixed a warning - * events.c (handle_key): use dynamically allocated strings + * src/events.c (handle_key): use dynamically allocated strings - * bar.c (display_msg_in_bar), - * sbuf.c (xrealloc): changed an fprintf to PRINT_DEBUG + * src/bar.c (display_msg_in_bar), + * src/sbuf.c (xrealloc): changed an fprintf to PRINT_DEBUG 2001-02-15 Ryan Yeske <rcyeske@cut.hotdog.tmp> - * list.c (save_mouse_position): changed declaration of mask to + * src/list.c (save_mouse_position): changed declaration of mask to unsigned int (get_mouse_root_position): changed declaration of mask to unsigned int - * actions.c (xterm_command): added new function. Thanks to Ben + * src/actions.c (xterm_command): added new function. Thanks to Ben Leslie <benno@sesgroup.net> (user_commands): added "xterm" (key_actions): added C-t C-! binding for "xterm" - * messages.h (MESSAGE_PROMPT_XTERM_COMMAND): new message + * src/messages.h (MESSAGE_PROMPT_XTERM_COMMAND): new message 2001-02-14 Ryan Yeske <rcyeske@cut.hotdog.tmp> - * actions.h (generate_key_event): added prototype + * src/actions.h (generate_key_event): added prototype - * actions.c (key_actions): added additional keybindings to include + * src/actions.c (key_actions): added additional keybindings to include C- versions for all keys. (generate_key_event): added command 2001-02-13 Ryan Yeske <rcyeske@cut.hotdog.tmp> - * bar.c (update_window_names): get indexes around current window + * src/bar.c (update_window_names): get indexes around current window text to pass to display_msg_in_bar (display_msg_in_bar): xor a rectangle around the text represented by mark_start and mark_end arguments - * conf.h (BAR_FG_COLOR): changed to black + * src/conf.h (BAR_FG_COLOR): changed to black (BAR_BG_COLOR): changed to white (FONT_NAME): changed to 9x15bold (BAR_Y_PADDING): changed to zero (BAR_X_PADDING): changed to zero - * data.h (struct screen_info): removed bold_gc + * src/data.h (struct screen_info): removed bold_gc - * events.c (handle_key): can no longer over modify keystrokes + * src/events.c (handle_key): can no longer over modify keystrokes (handle_key): updated call to display_msg_in_bar to take extra highlighting parameters. - * main.c (init_screen): removed bold_color + * src/main.c (init_screen): removed bold_color (XGCValues gv): made global - * actions.h (user_command): new struct + * src/actions.h (user_command): new struct (argtype): new enumeration - * actions.h: many updated prototypes + * src/actions.h: many updated prototypes - * actions.c (key_actions): every command is now executed by + * src/actions.c (key_actions): every command is now executed by calling command() with a string version of the command, rewrote this table to reflect that. (user_commands): new symbol table added, a mapping between strings @@ -604,24 +622,24 @@ through "/bin/sh -c" (get_screen): new function. - * actions.c: all calls to display_msg_in_bar updated to call with + * src/actions.c: all calls to display_msg_in_bar updated to call with 2 additional highlight parameters. - * actions.c (goto_win_by_name, rename_current_window, ...): most + * src/actions.c (goto_win_by_name, rename_current_window, ...): most all user functions that need arguments will prompt the user for them, unless they are supplied. Allows the same function to be used interactively or internally. - * bar.h (display_msg_in_bar): updated prototype + * src/bar.h (display_msg_in_bar): updated prototype - * bar.c (display_msg_in_bar): takes two additional int arguments + * src/bar.c (display_msg_in_bar): takes two additional int arguments which are offsets into the string describing which part of the text to draw highlighted. (update_window_names): highlight current window 2001-02-12 Ryan Yeske <rcyeske@cut.hotdog.tmp> - * actions.c (spawn): will now execute commands with arguments by + * src/actions.c (spawn): will now execute commands with arguments by execl'ing through /bin/sh -c 2001-02-11 Ryan Yeske <rcyeske@cut.hotdog.tmp> @@ -630,31 +648,31 @@ 2001-02-11 Ryan Yeske <rcyeske@cut.hotdog.tmp> - * ratpoison.h: #include "sbuf.h" + * src/ratpoison.h: #include "sbuf.h" removed duplicate #include "messages.h" - * Makefile.am (ratpoison_SOURCES): added sbuf.c sbuf.h + * src/Makefile.am (ratpoison_SOURCES): added sbuf.c sbuf.h - * bar.c (calc_bar_width): removed function + * src/bar.c (calc_bar_width): removed function (update_window_names): now builds up the entire window list string in dynamic storage before printing the window list. No longer displays the current window in a different colour. 2001-02-11 shawn <sabetts@diggin.lamenet.tmp> - * main.c (set_sig_handler): Added + * src/main.c (set_sig_handler): Added (main): Uses set_sig_handler() instead of signal() - * manage.h (set_state): Added prototype + * src/manage.h (set_state): Added prototype - * manage.c (send_configure): Now sends the window's x,y,width,height + * src/manage.c (send_configure): Now sends the window's x,y,width,height coordinates. (set_state): Added - * events.c (map_request): Calls set_state when mapping an unmapped + * src/events.c (map_request): Calls set_state when mapping an unmapped window. - * actions.c (maximize_transient): takes an rp_window as the + * src/actions.c (maximize_transient): takes an rp_window as the argument. Removed code to handle void *data. Incremental resizing only happens if the maximum size isn't set. Removed actual X maximization code. @@ -662,16 +680,16 @@ 2001-02-10 Ryan Yeske <rcyeske@cut.hotdog.tmp> - * ratpoison.h: #include "messages.h" + * src/ratpoison.h: #include "messages.h" - * list.h (goto_window_number): moved prototype to actions.h + * src/list.h (goto_window_number): moved prototype to actions.h - * actions.h (goto_window_number): added prototype + * src/actions.h (goto_window_number): added prototype (goto_window): removed prototype - * Makefile.am (ratpoison_SOURCES): added messages.h + * src/Makefile.am (ratpoison_SOURCES): added messages.h - * actions.c (prev_window): display correct message when there is + * src/actions.c (prev_window): display correct message when there is no other window or there are no windows at all. (next_window): display correct message when there is no other window or there are no windows at all. @@ -679,10 +697,10 @@ argument instead of a dedicated function. (key_actions): XK_exclam now runs execute_command - * actions.c: replaced all user message strings with #define'd + * src/actions.c: replaced all user message strings with #define'd messages. - * actions.h (goto_window): removed + * src/actions.h (goto_window): removed (goto_window_0): removed (goto_window_1): removed (goto_window_2): removed @@ -695,27 +713,27 @@ 2001-02-10 shawn <sabetts@diggin.lamenet.tmp> - * communications.c (send_restart, send_kill): Added + * src/communications.c (send_restart, send_kill): Added - * ratpoison.h: includes communications.h + * src/ratpoison.h: includes communications.h - * main.c (send_restart, send_kill): Moved to communications.c + * src/main.c (send_restart, send_kill): Moved to communications.c - * list.c (get_mouse_root_position): Added + * src/list.c (get_mouse_root_position): Added (add_to_window_list): Initialize new rp_window fields (save_mouse_position): Added (set_active_window): Added code to save and restore the position of the mouse - * events.c (property_notify): Added code to listen for a + * src/events.c (property_notify): Added code to listen for a WM_TRANSIENT_FOR property change. - * data.h (struct rp_window): Added transient, transient_for, mouse_x, mouse_y. + * src/data.h (struct rp_window): Added transient, transient_for, mouse_x, mouse_y. - * actions.c (maximize_transient): Added + * src/actions.c (maximize_transient): Added (maximize): Added code to handle transient windows differently - * Makefile.am (ratpoison_SOURCES): Added communications.h and communications.c + * src/Makefile.am (ratpoison_SOURCES): Added communications.h and communications.c 2001-02-04 Ryan Yeske <rcyeske@cut.hotdog.tmp> @@ -725,226 +743,226 @@ 2001-01-02 shawn <sabetts@diggin.lamenet.tmp> - * communications.c (send_restart): moved from main.c + * src/communications.c (send_restart): moved from main.c (send_kill): moved from main.c - * main.c: Removed send_kill, send_restart + * src/main.c: Removed send_kill, send_restart - * input.h: Added copyright notice. + * src/input.h: Added copyright notice. - * input.c: Added copyright notice. + * src/input.c: Added copyright notice. - * actions.c: Added copyright notice. + * src/actions.c: Added copyright notice. 2001-02-04 Ryan Yeske <rcyeske@cut.hotdog.tmp> - * actions.c (prev_window): do not set active window when + * src/actions.c (prev_window): do not set active window when recursing. (next_window): do not set active window when recursing. 2001-01-28 Ryan Yeske <rcyeske@soya.hotdog.tmp> - * actions.c: changed rename_current_window key to `A', bound `a' + * src/actions.c: changed rename_current_window key to `A', bound `a' to show_clock 2001-01-02 shawn <sabetts@diggin.lamenet.tmp> - * actions.h (show_clock): added prototype + * src/actions.h (show_clock): added prototype - * actions.c (show_clock): added + * src/actions.c (show_clock): added 2000-12-15 shawn <sabetts@badbox.secure.basis.org> - * actions.c (maximize): increment size in hints->width_inc and + * src/actions.c (maximize): increment size in hints->width_inc and hints->height_inc intervals - * manage.c (manage): set the dimension members of the rp_window struct + * src/manage.c (manage): set the dimension members of the rp_window struct 2000-12-15 shawn <sabetts@diggin.lamenet.tmp> - * manage.c (manage): added ColormapChangeMask and + * src/manage.c (manage): added ColormapChangeMask and StructureNotifyMask to events listened for on managed windows. - * main.c (main): propagated changes to set_active_window usage + * src/main.c (main): propagated changes to set_active_window usage - * events.c: propagated changes to set_active_window usage + * src/events.c: propagated changes to set_active_window usage - * data.h (struct rp_window): Added colormap member + * src/data.h (struct rp_window): Added colormap member - * list.c (set_active_window): Installs colormap + * src/list.c (set_active_window): Installs colormap (set_active_window): sets rp_current_window to window passed in as parameter - * actions.c (prev_window): No longer uses rp_current_window to + * src/actions.c (prev_window): No longer uses rp_current_window to keep track of state (next_window): No longer uses rp_current_window to keep track of state - * list.c (add_to_window_list): sets member colormap to the + * src/list.c (add_to_window_list): sets member colormap to the DefaultColormap - * manage.c (update_window_name): fixed memory leak. Not freeing + * src/manage.c (update_window_name): fixed memory leak. Not freeing the win->name before updating it. (manage): Gets the colormap now. - * list.c (add_to_window_list): Added init code for `hints' + * src/list.c (add_to_window_list): Added init code for `hints' - * events.c (property_notify): Added handler for XA_WM_NORMAL_HINTS. + * src/events.c (property_notify): Added handler for XA_WM_NORMAL_HINTS. - * data.h (struct rp_window): Added XSizeHints member + * src/data.h (struct rp_window): Added XSizeHints member - * actions.c (maximize): Adhere to the window's Size Hints + * src/actions.c (maximize): Adhere to the window's Size Hints 2000-12-14 shawn <sabetts@diggin.lamenet.tmp> - * manage.h (update_normal_hints): added prototype + * src/manage.h (update_normal_hints): added prototype - * manage.c (update_normal_hints): added + * src/manage.c (update_normal_hints): added - * list.c (add_to_window_list): added comment describing function + * src/list.c (add_to_window_list): added comment describing function 2000-12-13 shawn <sabetts@diggin.lamenet.tmp> - * actions.c: removed gross tabs from key_actions definition. Add + * src/actions.c: removed gross tabs from key_actions definition. Add C-t space to go to next window. 2000-12-09 shawn <sabetts@diggin.lamenet.tmp> - * data.h (struct rp_window): added x, y, width, height, border; + * src/data.h (struct rp_window): added x, y, width, height, border; - * events.c (configure_request): Now honours request, but then + * src/events.c (configure_request): Now honours request, but then maximizes it afterwards. (configure_request): updates the rp_window's geometry fields - * manage.c (manage): commented out XMoveResizeWindow call + * src/manage.c (manage): commented out XMoveResizeWindow call (send_configure): added - * actions.h (maximize): added prototype + * src/actions.h (maximize): added prototype - * actions.c (maximize): added + * src/actions.c (maximize): added - * input.c (cook_keycode): properly handle LockMask + * src/input.c (cook_keycode): properly handle LockMask (cook_keycode): updated comments - * input.h: added prototype for keysym_to_string + * src/input.h: added prototype for keysym_to_string - * input.c (keysym_to_string): added + * src/input.c (keysym_to_string): added - * bar.c (show_bar): update_window_names(s) is called whether the + * src/bar.c (show_bar): update_window_names(s) is called whether the bar is raised or not. - * conf.h: Added BAR_Y_PADDING BAR_X_PADDING + * src/conf.h: Added BAR_Y_PADDING BAR_X_PADDING - * list.c (goto_window_name): return success or failure + * src/list.c (goto_window_name): return success or failure - * list.h: updated prototype for goto_window_name + * src/list.h: updated prototype for goto_window_name - * events.c (handle_key): Added a message indicating an unbound + * src/events.c (handle_key): Added a message indicating an unbound key. - * bar.c (display_msg_in_bar): added + * src/bar.c (display_msg_in_bar): added (update_window_names): uses BAR_X_PADDING instead of `5' (update_window_names): Updated BAR_PADDING to BAR_Y_PADDING - * input.c (cook_keycode): mod is now an usigned int + * src/input.c (cook_keycode): mod is now an usigned int (read_key): Ignores modifier keys. Now returns keysym and modifiers. (get_input): Updated BAR_PADDING to BAR_Y_PADDING and BAR_X_PADDING. - * events.c (handle_key): uses read_key instead of XMaskEvent to + * src/events.c (handle_key): uses read_key instead of XMaskEvent to read a key. - * actions.c (goto_window_number): window list is displayed on failure. + * src/actions.c (goto_window_number): window list is displayed on failure. (bye): added (switch_to): added (execute_command): no longer seg faults when no windows exist. 2000-12-03 shawn <sabetts@diggin.lamenet.tmp> - * input.h (cook_keycode): added prototype + * src/input.h (cook_keycode): added prototype - * actions.c: key_actions now uses the #define'd keysyms from X11/keysym.h + * src/actions.c: key_actions now uses the #define'd keysyms from X11/keysym.h - * events.c (handle_key): calls cook_keycode() before processing the keysym. + * src/events.c (handle_key): calls cook_keycode() before processing the keysym. - * input.c (read_key): calls cook_keycode() before returning the keysym + * src/input.c (read_key): calls cook_keycode() before returning the keysym (cook_keycode): added. 2000-12-01 shawn <sabetts@diggin.lamenet.tmp> - * list.c (find_window_by_name): added check to make sure the + * src/list.c (find_window_by_name): added check to make sure the window's state is not STATE_UNMAPPED. 2000-11-27 shawn <sabetts@diggin.lamenet.tmp> - * events.c (handle_key): Code to generate the prefix event has + * src/events.c (handle_key): Code to generate the prefix event has been moved to generate_prefix(). - * actions.h (toggle_bar): added prefixes for generate_prefix, and + * src/actions.h (toggle_bar): added prefixes for generate_prefix, and abort_keypress. - * actions.c (generate_prefix): added. + * src/actions.c (generate_prefix): added. (abort_keypress): added. 2000-11-04 Ryan Yeske <rcyeske@vcn.bc.ca> - * Makefile.am (ratpoison_SOURCES): added getopt.c, getopt1.c and + * src/Makefile.am (ratpoison_SOURCES): added getopt.c, getopt1.c and getopt.h 2000-10-30 Ryan Yeske <rcyeske@vcn.bc.ca> - * actions.h (execute_command): added prototype + * src/actions.h (execute_command): added prototype - * actions.c (rename_current_window): added test to skip renaming + * src/actions.c (rename_current_window): added test to skip renaming if user entered an empty string (execute_command): added command (key_actions): execute_command is called by pressing ':' 2000-10-30 shawn <sabetts@badbox.secure.basis.org> - * conf.h: added HIDE_MOUSE + * src/conf.h: added HIDE_MOUSE 2000-10-24 Ryan Yeske <rcyeske@vcn.bc.ca> - * bar.c (bar_x): rightmost border is no longer off screen + * src/bar.c (bar_x): rightmost border is no longer off screen 2000-10-20 shawn <sabetts@badbox.secure.basis.org> - * events.c (key_press): fixed MODIFIER_PREFIX bug + * src/events.c (key_press): fixed MODIFIER_PREFIX bug 2000-10-19 Ryan yeske <rcyeske@van.gobasis.com> - * manage.c (unmanaged_window): added. + * src/manage.c (unmanaged_window): added. - * conf.h (PADDING_LEFT, PADDING_TOP, PADDING_RIGHT, + * src/conf.h (PADDING_LEFT, PADDING_TOP, PADDING_RIGHT, PADDING_BOTTOM, UNMANAGED_WINDOW_LIST): added. Windows listed in UNMANAGED_WINDOW_LIST will not be managed. Space reserved for unmanaged windows can be defined with PADDING_* 2000-10-19 shawn <sabetts@badbox.secure.basis.org> - * manage.c (get_window_name): added + * src/manage.c (get_window_name): added 2000-10-17 shawn <sabetts@vcn.bc.ca> - * events.c (configure_request): resize windows to the max-1. Call + * src/events.c (configure_request): resize windows to the max-1. Call XConfigureWindow as well as XSendEvent. - * manage.c (scanwins): Now only maps visible windows + * src/manage.c (scanwins): Now only maps visible windows - * conf.h: Removed keystroke related defines + * src/conf.h: Removed keystroke related defines - * actions.c: Moved all key activated functions here. Added + * src/actions.c: Moved all key activated functions here. Added key_actions array. - * events.c (unmap_notify): now properly unmaps windows + * src/events.c (unmap_notify): now properly unmaps windows - * data.h: added ignore_badwindow + * src/data.h: added ignore_badwindow - * main.c (handler): added ability to ignore BadWindow errors + * src/main.c (handler): added ability to ignore BadWindow errors 2000-10-15 shawn <sabetts@vcn.bc.ca> - * main.c, data.h, events.c: Added ability to kill and hup running - ratpoison processes. + * src/main.c, src/data.h, src/events.c: Added ability to kill and + hup running ratpoison processes. @@ -1,6 +1,10 @@ ratpoison NEWS --- history of user-visible changes. -*- outline -*- * Changes since 0.1.0 +** window borders are configurable +WINDOW_BORDER_WIDTH has been added to conf.h. This constant determines +the border width for all windows. + ** Window list changes A '+' is now drawn between the window number and the window name for the last accessed window. @@ -44,7 +48,7 @@ When the auto close feature is enabled, ratpoison will exit when the last managed window is closed. This feature can be turned on by uncommenting the line: -//#define AUTO_CLOSE +/* #define AUTO_CLOSE */ in conf.h @@ -34,9 +34,12 @@ /* The minimum size of the input window */ #define INPUT_WINDOW_SIZE 200 +/* The border width ratpoison configures all windows with */ +#define WINDOW_BORDER_WIDTH 0 + /* Pressing a key sends the mouse to the bottom right corner. This doesn't work very well yet. */ -//#define HIDE_MOUSE +/* #define HIDE_MOUSE */ #define FOREGROUND "black" #define BACKGROUND "white" diff --git a/src/manage.c b/src/manage.c index 07569d8..9980f93 100644 --- a/src/manage.c +++ b/src/manage.c @@ -175,8 +175,6 @@ update_window_information (rp_window *win) { XWindowAttributes attr; - PRINT_DEBUG ("managing new window\n"); - update_window_name (win); /* Get the WM Hints */ @@ -189,6 +187,7 @@ update_window_information (rp_window *win) win->y = attr.y; win->width = attr.width; win->height = attr.height; + win->border = attr.border_width; } void @@ -294,6 +293,9 @@ maximize_transient (rp_window *win) { int maxx, maxy; + /* Set the window's border */ + win->border = WINDOW_BORDER_WIDTH; + /* Honour the window's maximum size */ if (win->hints->flags & PMaxSize) { @@ -327,8 +329,10 @@ maximize_transient (rp_window *win) PRINT_DEBUG ("maxsize: %d %d\n", maxx, maxy); - win->x = PADDING_LEFT - win->width / 2 + (win->scr->root_attr.width - PADDING_LEFT - PADDING_RIGHT) / 2;; - win->y = PADDING_TOP - win->height / 2 + (win->scr->root_attr.height - PADDING_TOP - PADDING_BOTTOM) / 2;; + win->x = PADDING_LEFT - win->width / 2 + + (win->scr->root_attr.width - PADDING_LEFT - PADDING_RIGHT - win->border * 2) / 2; + win->y = PADDING_TOP - win->height / 2 + + (win->scr->root_attr.height - PADDING_TOP - PADDING_BOTTOM - win->border * 2) / 2; win->width = maxx; win->height = maxy; } @@ -343,6 +347,9 @@ maximize_normal (rp_window *win) int off_x = 0; int off_y = 0; + /* Set the window's border */ + win->border = WINDOW_BORDER_WIDTH; + /* Honour the window's maximum size */ if (win->hints->flags & PMaxSize) { @@ -355,8 +362,10 @@ maximize_normal (rp_window *win) } else { - maxx = win->scr->root_attr.width - PADDING_LEFT - PADDING_RIGHT; - maxy = win->scr->root_attr.height - PADDING_TOP - PADDING_BOTTOM; + maxx = win->scr->root_attr.width + - PADDING_LEFT - PADDING_RIGHT - win->border * 2; + maxy = win->scr->root_attr.height + - PADDING_TOP - PADDING_BOTTOM - win->border * 2; /* Make sure we maximize to the nearest Resize Increment specified by the window */ @@ -406,7 +415,7 @@ maximize (rp_window *win) /* Actually do the maximizing */ XMoveResizeWindow (dpy, win->w, win->x, win->y, win->width, win->height); - + XSetWindowBorderWidth (dpy, win->w, win->border); XSync (dpy, False); } @@ -423,7 +432,7 @@ force_maximize (rp_window *win) /* Actually do the maximizing */ XMoveResizeWindow (dpy, win->w, win->x, win->y, win->width+1, win->height+1); XMoveResizeWindow (dpy, win->w, win->x, win->y, win->width, win->height); - + XSetWindowBorderWidth (dpy, win->w, win->border); XSync (dpy, False); } |