Age | Commit message (Collapse) | Author |
|
* 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.
|
|
(clean_up): call free_screen on each screen. free the screen
array. free defaults.window_fmt.
* src/number.h (free_numbers): new prototype
* src/number.c (free_numbers): new function
* src/manage.c (get_wmname): use XGetWindowProperty to get the
window name.
(unmanaged_window): free wname after using it.
* src/main.c (wm_name): new global
(main): internalize WM_NAME atom.
(clean_up): free data structures for keybindings, aliases, the
bar, window numbers, and input history.
* src/input.h (free_history): new prototype
* src/input.c (free_history): new function
* src/events.c (execute_remote_command): free properties returned
by XGetWindowProperty().
* src/data.h (wm_name): new extern
* src/communications.c (recieve_command_result): free properties
returned by XGetWindowProperty().
* src/bar.h (free_bar): new prototype
* src/bar.c (update_window_names): bar_buffer is not static.
(update_window_names): free bar_buffer after using it.
(marked_message): free the GC after using it.
(free_bar): new function.
* src/actions.h (free_keybindings): new prototype
(free_aliases): likewise
* src/actions.c (free_keybindings): new function
(free_aliases): likewise
(cmd_tmpwm): unmap the key window before calling the new wm, and
remap it afterwards.
|
|
* 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.
|
|
preprocessor.
* src/ratpoison.h (PRINT_LINE): new macro.
(PRE_PRINT_LOCATION): remove macro
(PRINT_ERROR): takes one argument which is the argument list
,parens and all, to be passed to printf. Callers updated.
* src/actions.c (cmd_number): use list delete entry macro
(cmd_number): likewise
(cmd_escape): use list looping macro
(cmd_escape): likewise
(cmd_defpadding): likewise
(cmd_defborder): likewise
* src/events.c (mapping_notify): use list looping macro
(mapping_notify): likewise
* src/list.c: rename rp_unmapped_window_sentinel to
rp_unmapped_window and rp_mapped_window_sentinel to
rp_mapped_window. Use LIST_HEAD to create them. externs updated.
(add_to_window_list): use list add entry macro.
(find_window_in_list): list head is of type list_head. Prototype
and callers updated.
(find_window_in_list): use list looping macro
(init_window_list): remove function
(find_window_number): use list looping macro
(find_window_name): likewise
(find_window_prev): use list previous entry macro
(find_window_next): use list next entry macro
(find_window_other): use list looping macro
(append_to_list): remove function
(insert_into_list): use list looping macro
(insert_into_list): use list add entry macro
(remove_from_list): remove function
(get_window_list): use list looping macro
* src/main.c (main): do not call init_window_list()
* src/manage.c (unmanage): use list delete macro
(map_window): likewise
(withdraw_window): use list moving macro to move entry to
another list.
(hide_others): use list looping macro
* src/split.c (num_frames): use list looping macro
(frames_screen): likewise
(maximize_all_windows_in_frame): likewise
(delete_frame_from_list): remove function
(create_initial_frame): remove list init code. Add current frame
to screen's frame list.
(init_frame_list): use list init macro
(find_last_frame): use list looping macro
(find_windows_frame): likewise
(find_frame_next): use list next entry macro
(find_frame_prev): use list previous entry macro
(find_window_for_frame): use list looping macro
(split_frame): use list add entry macro
(remove_all_splits): use list looping macro
(resize_frame_vertically): likewise
(resize_frame_horizontally): likewise
(total_frame_area): likewise
(frame_overlaps): likewise
(remove_frame): likewise
(find_frame_up): likewise
(find_frame_down): likewise
(find_frame_left): likewise
(find_frame_right): likewise
|
|
(cmd_number): likewise
(cmd_escape): use list looping macro
(cmd_escape): likewise
(cmd_defpadding): likewise
(cmd_defborder): likewise
* src/data.h: include linkedlist.h
(struct rp_window_frame): use struct list_head instead of next,
prev pointers.
(struct rp_window): likewise
(struct screen_info): rename rp_window_frame_sentinel to
rp_window_frames and change it's type to list_head.
* src/events.c (mapping_notify): use list looping macro
(mapping_notify): likewise
* src/list.c: rename rp_unmapped_window_sentinel to
rp_unmapped_window and rp_mapped_window_sentinel to
rp_mapped_window. Use LIST_HEAD to create them. externs updated.
(add_to_window_list): use list add entry macro.
(find_window_in_list): list head is of type list_head. Prototype
and callers updated.
(find_window_in_list): use list looping macro
(init_window_list): remove function
(find_window_number): use list looping macro
(find_window_name): likewise
(find_window_prev): use list previous entry macro
(find_window_next): use list next entry macro
(find_window_other): use list looping macro
(append_to_list): remove function
(insert_into_list): use list looping macro
(insert_into_list): use list add entry macro
(remove_from_list): remove function
(get_window_list): use list looping macro
* src/main.c (main): do not call init_window_list()
* src/manage.c (unmanage): use list delete macro
(map_window): likewise
(withdraw_window): use list moving macro to move entry to
another list.
(hide_others): use list looping macro
* src/split.c (num_frames): use list looping macro
(frames_screen): likewise
(maximize_all_windows_in_frame): likewise
(delete_frame_from_list): remove function
(create_initial_frame): remove list init code. Add current frame
to screen's frame list.
(init_frame_list): use list init macro
(find_last_frame): use list looping macro
(find_windows_frame): likewise
(find_frame_next): use list next entry macro
(find_frame_prev): use list previous entry macro
(find_window_for_frame): use list looping macro
(split_frame): use list add entry macro
(remove_all_splits): use list looping macro
(resize_frame_vertically): likewise
(resize_frame_horizontally): likewise
(total_frame_area): likewise
(frame_overlaps): likewise
(remove_frame): likewise
(find_frame_up): likewise
(find_frame_down): likewise
(find_frame_left): likewise
(find_frame_right): likewise
|
|
(chld_handler): new function
* src/events.c: include sys/wait.h
(handle_signals): Print an error message in the case of a child
signal.
* src/data.h (struct rp_child_info): New struct.
(child_info): New global.
(chld_signalled): likewise
* src/actions.c (spawn): Let the SIGCHLD handler handle process
completion instead of doing an ugly dance.
|
|
PRINT_DEBUG are defined as void macros.
* src/events.c (client_msg): Add semicolon to the end of a
PRINT_DEBUG line.
* src/actions.c (cmd_bind): typecast data as a (char *) before
using it in (char *) pointer arithmetic.
* configure.in: Add check to see if the preprocessor has variable
argument macro capabilities.
|
|
* src/actions.c: include <strings.h>
include setenv implementation if HAVE_SETENV is not set,
OR setenv is not defined (removes a compiler warning on
AIX)
* src/events.c: include <strings.h>
* src/getopt.c: include <strings.h>
|
|
* src/sbuf.c: likewise
* src/events.c: likewise
* src/communications.c: likewise
|
|
more readable.
* src/events.c (configure_request): call XSync after granting
configure request.
(property_notify): maximize the window on receiving a normal hints
property change.
|
|
(force_maximize): likewise
(unhide_window): likewise
(unhide_window_below): likewise
* src/events.c (configure_notify): remove function.
(configure_request): grant the request, then immediately maximize
the window.
(delegate_event): ignore ConfigureNotify events.
(configure_request): grant the request if ratpoison isn't managing
the window.
|
|
event caused by the geometry change if the window is not mapped.
|
|
window is bigger than its frame.
(maximize): ignore the structure events generated by the maximize
(force_maximize): likewise
(unhide_window): likewise
(unhide_window_below): likewise
* src/events.c (configure_notify): Clear up ambiguous debugging
output.
(configure_request): initialize the changes structure to the
window's current attributes.
|
|
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.
|
|
out.
|
|
(cmd_alias): When an alias is already in the alias list, replace
it with the new alias.
* src/events.c (configure_request): do not send a synthetic
configure notify event.
|
|
x, y, width, height and border. Prototype updated. All callers
updated.
* src/events.c (configure_request): For the changes variable, fill
in geometry parameters not part of the request with the
window's geometry.
* src/manage.c (update_normal_hints): improve debugging output.
|
|
(delegate_event): add ConfigureNotify to the ignored events list.
* src/manage.c (update_normal_hints): improve debugging output.
|
|
* src/actions.c (cmd_rename): Allows the user to specify a second
argument which is the number of the window whose number will be
set to the first argument.
|
|
bar_window and the frame_window.
* src/events.h (listen_for_events): new prototype
* src/events.c (configure_notify): If the event dimensions don't
match the windows, then re-maximize the window.
(configure_request): always grant the requests.
(delegate_event): Changes to the debugging output.
(delegate_event): Don't print debugging messages for events that
ratpoison doesn't need to handle.
(handle_signals): new function
(listen_for_events): new function
(handle_events): remove function. Dependant code uses
listen_for_events.
(get_event): likewise
* src/main.c (clean_up): don't map iconized windows.
|
|
* src/main.c (rp_error_msg): new global variable
* src/events.c (get_event): If there is an X11 error message to
print, print it.
* src/main.c (handler): record the error in rp_error_msg
|
|
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.
|
|
* 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"
|
|
|
|
(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".
|
|
(window_name): new prototype
(get_window_list): update prototype
* src/events.c (grab_rat): Don't wrap in an #ifdef
(ungrab_rat): likewise
(handle_key): record if the rat is grabbed and only ungrab it at
the end if it was first grabbed.
* src/actions.h (cmd_pos): new prototype
(cmd_defwinpos): new prototype
(cmd_deftranspos): new prototype
(cmd_defmaxsizepos): new prototype
(cmd_defbartimeout): new prototype
(cmd_defbarloc): new prototype
(cmd_deffont): new prototype
(cmd_defpadding): new prototype
(cmd_defborder): new prototype
(cmd_definputwidth): new prototype
(cmd_defwaitcursor): new prototype
(cmd_defwinfmt): new prototype
(cmd_defwinname): new prototype
* src/messages.h (MESSAGE_FRAME_STRING): new message
* src/manage.c (get_wmname): renamed from get_window_name
(get_class_hints): new function
(get_res_name): likewise
(get_res_class): likewise
(update_window_name): update the window's wm_name, res_name, and
res_class fields.
(update_window_name): calls functions get_wmname, get_res_name,
get_res_class.
(update_window_name): Don't crop the window name.
(update_window_information): call update_window_position.
(move_window): new function
(maximize_transient): only set the window's width and height
fields.
(maximize_normal): likewise
(maximize): call move_window
(force_maximize): likewise
(force_maximize): if the window has resize hints, resize it 1
resize unit.
* src/main.c: new global variable, defaults. remove static
variable, font, and move to defaults. Dependant code updated.
(init_defaults): new function
(main): call init_defaults.
(init_screen): initialize the screen's fg_color to black and
bg_color to white.
* src/list.c (free_window): free the fields user_name, res_name,
res_class, and wm_name.
(update_window_position): new function
(window_name): new function. Code accessing a window's name uses
this function. All code updated.
(add_to_window_list): call update_window_position
(add_to_window_list): initialize wm_name, res_name, and res_class
for the new window.
(format_window_name): new function
(get_window_list): Add parameter fmt. All callers updated.
(get_window_list): call format_window_name.
* src/conf.h: move Configuration variables to the global variable,
defaults. Dependant code updated.
* src/data.h (TOP_LEFT): new 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): new fields user_name, wm_name, res_name,
res_class, position.
(struct rp_window): remove field name. Replaced with
user_name. Dependant code updated.
(struct screen_info): remove field font. dependant code updated.
(struct screen_info): new fields fg_color, bg_color.
(struct rp_defaults): new struct
(defaults): new global
* src/actions.c (parse_winpos): new function
(cmd_pos): likewise
(cmd_defwinpos): likewise
(cmd_deftranspos): likewise
(cmd_defmaxsizepos): likewise
(cmd_defbartimeout): likewise
(cmd_defbarloc): likewise
(cmd_deffont): likewise
(cmd_defpadding): likewise
(cmd_defborder): likewise
(cmd_definputwidth): likewise
(cmd_defwaitcursor): likewise
(cmd_defwinfmt): likewise
(cmd_defwinname): likewise
(user_commands): New commands defbarloc, defbartimeout, defborder,
deffont, defintputwidth, defmaxsizepos, defpadding, deftranspos,
defwaitcursor, defwinfmt, defwinname, defwinpos.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
a result string
|
|
|
|
(ungrab_rat): likewise
(handle_key): only change the mouse icon if USE_WAITFORKEY_CURSOR is
defined.
* src/conf.h (USE_WAITFORKEY_CURSOR): new define
|
|
(rp_rat_mask_bits): remove include <X11/cursorfont.h>
(sighandler): only increment kill_signalled
(hup_handler): only increment hup_signalled
(alrm_handler): only increment alarm_signalled
(read_startup_files): use PRINT_ERROR for error messages.
(init_rat_cursor): Use a standard X cursor for the screen's rat.
* src/events.h (unmap_notify): remove prototype
(delegate_event): likewise
(key_press): likewise
(keymapstate): likewise
(map_request): likewise
* src/events.c: includes <signal.h> <sys/time.h> and <error.h>
(new_window): static function
(unmap_notify): likewise
(map_request): likewise
(destroy_window): likewise
(configure_notify): likewise
(configure_request): likewise
(key_press): likewise
(property_notify): likewise
(colormap_notify): likewise
(delegate_event): likewise
(get_event): new function
(more_destroy_events): remove function
(handle_events): call get_event.
* src/data.h: rp_current_event is an XEvent dependant code
updated. new globals alarm_signalled, kill_signalled,
hup_signalled.
* src/actions.c (initialize_default_keybindings): new bindings for
"split" and "vsplit".
|
|
* src/data.h (WIN_EVENTS): Add StructureNotifyMask.
* src/events.c (unmap_notify): ignore SubstructureNotify unmaps.
|
|
unmapping the window.
* src/list.c (add_to_window_list): use WIN_EVENTS in XSelectInput.
* src/data.h (struct rp_window): remove iconizing field. remove
code using iconizing.
(WIN_EVENTS): new define
|
|
|
|
|
|
retrieving and installing the colormap.
* src/manage.c (withdraw_window): ignore badwindows during all
Xlib calls.
|
|
init_modifier_map. all callers updated. prototype updated.
* src/events.c (mapping_notify): new function
(delegate_event): handle MappingNotify events.
|
|
|
|
* src/manage.c (scanwins): ignore the help window
(hide_window): increment window's iconizing variable
* src/main.c (main): display welcoming message
(init_screen): create the help window
(init_screen): don't map the frame indicator window
(clean_up): destroy the help window
* src/list.c (add_to_window_list): initialize iconizing to 0
* src/events.c (new_window): skip help_window
(unmap_notify): skip normal processing if the event is from
iconizing the window.
(unmap_notify): clean up the window's frame if it is being
withdrawn.
* src/data.h (struct screen_info): new variable help_window
* src/bar.c (update_window_names): only print the window list if
the bar is already displaying the window list.
* src/actions.h (cmd_help): new prototype
(cmd_quit): likewise
* src/actions.c (initialize_default_keybindings): new keybinding for "help"
(cmd_quit): new function
(cmd_help): likewise
|
|
* 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
|
|
|