Age | Commit message (Collapse) | Author |
|
- always build xrandr.c
- provide stubs in xrandr.c; only init_xrandr() anc xrandr_fill_screen()
are safe to call if XRandR support is not built in
Code that wants to use XRandR outside xrandr.c should test rp_have_xrandr.
|
|
|
|
The screen argument is useless as this function operates on all
screens. To find if a window belong to a specific ratpoison screen,
function is_rp_window_for_given_screen may be used.
|
|
|
|
|
|
|
|
Drop deprecated xinerama support and replace it with xrandr.
Signed-off-by: Mathieu OTHACEHE <m.othacehe@gmail.com>
|
|
|
|
|
|
* don't dereference it if NULL, as in unmap_notify
|
|
* properly define the way the wm may give feedback to ratpoison -c;
see communications.c:receive_command_result()
* follow this protocol in events.c:receive_command()
* modify receive_command_result() to return an int (which is the
mirror of the struct cmdret "success" member used on the wm side)
* pass that error status back to main.c; exit with an error status if
any of the commands we sent failed
|
|
* (events.c) extract xa_compound_text from selection_request(),
make it a global
* introduce xa_string (same as XA_STRING) and rename
utf8_string to xa_utf8_string, for consistency
|
|
In events.c's key_press, the screen the local pointer variable s
points to is accessed if HIDE_MOUSE is defined when hiding the cursor.
Directly after that there is a "if (!s) return;", which is obviously
too late.
By default HIDE_MOUSE is not defined in src/conf.h, so this is not
a problem unless this feature was enabled at compile time.
Found by cppcheck.
|
|
|
|
making sure _NET atoms are reset after tmpwm and deleted when exiting.
|
|
|
|
|
|
Before rp used xgrabkeyboard to read a key. Instead, the keyboard is
frozen when a top level key is read. Then when rp reads a key it first
sets the input focus to a suitable location such as key_window or
input_window, then thaws the keyboard and waits for a keypress. When a
key is pressed the keyboard is frozen again and the process repeats
until ratpoison is done reading input. At that point the keyboard is
thawed in a way that future keystrokes do not refreeze the keyboard.
|
|
|
|
(show_frame_indicator): only show frame indicator
(set_active_frame): new arg force_indicator. all callers updated.
(show_frame_indicator): new arg force. all callers updated.
* src/main.c (init_defaults): init bar_in_padding
* src/globals.c (rp_switch_screen_hook): new hook
* src/data.h (struct rp_defaults): new slot, bar_in_padding
* src/bar.c (bar_x): honour bar_in_padding setting
(bar_y): likewise
* src/actions.c (init_set_vars): add barinpadding
(set_barinpadding): new function
* src/globals.h: new global rp_switch_screen_hook
|
|
|
|
|
|
|
|
* src/events.c (property_notify): only update the window names if
the window name actually changed.
* src/bar.h (redraw_last_message): new prototype
* src/bar.c (update_bar): update the window list if that's what's
displayed. call redraw_last_message.
(update_window_names): call marked_message_internal.
(marked_message): call marked_message_internal.
(marked_message_internal): ripped body from old marked_message
minus alarm reset.
(redraw_last_message): new function
(show_last_message): call redraw_last_message
* src/actions.c: include ctype.h
(cmd_license): use redraw_last_message
(cmd_help): likewise
|
|
* src/events.c (selection_clear): take void arguments
(handle_signals): likewise
(listen_for_events): take void argumens. prototype updated
|
|
(init_xinerama): likewise
* src/window.c (init_window_stuff): take void arguments. prototype updated.
(free_window_stuff): likewise
* src/split.c (remove_all_splits): take void arguments. prototype updated.
(current_frame): likewise
(init_frame_lists): likewise
(find_last_frame): likewise
(current_window): likewise
(remove_all_splits): likewise
(hide_frame_indicator): likewise
(show_frame_indicator): likewise
* src/main.c (check_child_procs): take void arguments. prototype updated.
(clean_up): likewise
* src/number.c (numset_new): take void arguments. prototype updated.
* src/manage.c (clear_unmanaged_list): take void arguments. prototype updated.
(list_unmanaged_windows): likewise
(ungrab_keys_all_wins): likewise
(grab_keys_all_wins): likewise
(current_screen): likewise
(unhide_all_windows): likewise
* src/main.c (sighandler): static function
(hup_handler): likewise
(alrm_handler): likewise
(handler): likewise
(print_version): likewise
(print_help): likewise
(show_welcome_message): take void arguments
(init_defaults): likewise
* src/input.c (ring_bell): take void arguments. prototype updated
(update_modifier_map): likewise
* src/history.c (get_history_filename): take void arguments
(history_load): take void arguments. prototype updated
(history_save): likewise
(history_reset): likewise
(history_previous): likewise
(history_next): likewise
(history_list_items): likewise
* src/group.c (group_in_list): static function
(init_groups): take void arguments. prototype updated
(free_groups): likewise
(group_next_group): likewise
(group_prev_group): likewise
* src/globals.c (x_export_selection): take void arguments
(get_cut_buffer): likewise
(get_primary_selection): likewise
(get_selection): take void arguments. protype updated.
(init_globals): likewise
* src/events.c (selection_clear): take void arguments
(handle_signals): likewise
(listen_for_events): take void argumens. prototype updated
* src/bar.c (reset_alarm): take void arguments
(show_last_message): take void arguments. prototype updated.
(free_bar): likewise
* src/actions.c (init_set_vars): static function. take void arguments
(clear_frame_redos): take void arguments
(pop_frame_undo): likewise
(pop_frame_redo): likewise
(keymap_new): static function
(parse_keydesc): likewise
(trivial_completions): likewise
(keymap_completions): likewise
(window_completions): likewise
(group_completions): likewise
(colon_completions): likewise
(exec_completions): likewise
(hook_completions): likewise
(var_completions): likewise
(update_all_gcs): take void arguments
(grab_rat): likewise
(ungrab_rat): likewise
(init_user_commands): take void arguments. prototype updated.
(free_keymaps): likewise
(free_aliases): likewise
|
|
* src/main.c (init_defaults): init defaults.top_kmap
* src/events.c (handle_key): use defaults.top_kmap for the top kmap
* src/data.h (struct rp_defaults): new field, top_kmap
* src/actions.c (set_topkmap): new prototype
(init_set_vars): topkmap new set variable
(initialize_default_keybindings): use defaults.top_kmap for the top kmap
(cmd_undefinekey): likewise
(cmd_definekey): likewise
(cmd_escape): likewise
(cmd_delkmap): likewise
(set_topkmap): new function
|
|
|
|
(MESSAGE_MAP_WINDOW_GROUP): likewise
* src/manage.c (map_window): call show_rudeness_msg
* src/events.h (show_rudeness_msg): new prototype
* src/events.c (show_rudeness_msg): renamed from
show_rudeness_raise_msg. handle the MAP messages as well. all
callers updated.
|
|
|
|
* src/screen.c (screen_update): new function
(init_screen): listen for screen resizes
* src/screen.h: new prototype
* src/events.c (configure_notify): new function
(delegate_event): call configure_notify for ConfigureNotify events
* src/frame.c (frame_dump): remember the size of the screen the
frame coordinates are relative to.
(frame_restore): adopt coordinates to possible screen resizes.
* src/frame.h (frame_fump): take a screen argument
(frame_read): likewise
* src/actions.c (cmd_tmpwm): listen for screen resizes again
(fdump, frestore, cmd_fdump): supply screen to frame_dump, frameread
|
|
|
|
|
|
* src/events.c (mapping_notify): call ungrab_keys_all_wins and grab_keys_all_wins.
|
|
group and frame if window_mapped is 0.
* src/data.h (struct rp_child_info): new field window_mapped
* src/actions.c (spawn): init window_mapped field in child_info.
|
|
|
|
* src/manage.c (unhide_all_windows): new function.
* src/events.c (handle_signals): unhide windows before switching to a new wm
|
|
(get_child_info): new function
(add_to_window_list): get the window's client's pid if possible
and assign the window the appropriate group and frame.
(add_to_window_list): init intended_frame_number
(save_mouse_position): save the position relative to the window
(give_window_focus): restore the position relative to the window
(set_active_window_body): put the window in the frame contained in
intended_frame_number when appropriate.
* src/screen.c (screen_find_frame_by_frame): new function
(init_screen): add the net_supported atom to the root window.
* src/main.c (main): init netwm atoms
* src/group.c (groups_find_group_by_group): new function
* src/globals.c (_net_wm_pid, _net_supported): new globals
* src/data.h (struct rp_window): new field intended_frame_number.
(struct rp_child_info): new fields group, frame, screen.
* src/actions.c (spawn): call the command directly when new
argument, raw, is non zero. all callers updated.
(spawn): fill in the frame, group and screen for the child.
|
|
(MESSAGE_RAISE_WINDOW_GROUP): likewise
* src/group.h (groups_find_group_by_window): new prototype
* src/group.c (groups_find_group_by_window): new function.
* src/events.c (show_rudeness_raise_msg): new function
(map_request): call show_rudeness_raise_msg
(configure_request): likewise
|
|
* src/globals.c (rp_exec_newwm): new global.
* src/actions.c (cmd_newwm): set rp_exec_newwm to the new wm.
* src/events.c (listen_for_events): call XSync after
delegate_event.
(handle_signals): exec newwm if its not NULL. Report X11 errors
(moved from listen_for_events).
|
|
(ARG): likewise
(set_vars): change to a list_head.
(add_set_var): new function
(init_set_vars): likewise
(user_commands): change to a list_head. Move command definitions
to init_user_commands.
(add_command): new function
(init_user_commands): likewise
(cmdret_new): likewise
(cmdret_new_printf): likewise
(cmdret_free): likewise
(read_string): likewise
(read_keymap): likewise
(read_keydesc): likewise
(read_command): likewise
(read_shellcmd): likewise
(read_frame): likewise
(read_window): likewise
(read_gravity): likewise
(read_group): likewise
(read_hook): likewise
(read_variable): likewise
(hook_completions): likewise
(read_number): likewise
(read_arg): likewise
(parsed_input_to_args): likewise
(fill_in_missing_args): likewise
(parse_args): likewise
(arg_array): likewise
(arg_free): likewise
(command): use parse_args, parsed_input_to_args,
fill_in_missing_args to parse arguments and pass to command
functions.
(command): return cmdret* structure. prototype updated.
(cmd_abort): second arg is an array of struct cmdarg*. Return
cmdret*. Updated to use new parsed arguments.
(cmd_addhook): likewise
(cmd_alias): likewise
(cmd_banish): likewise
(cmd_bind): likewise
(cmd_chdir): likewise
(cmd_clrunmanaged): likewise
(cmd_colon): likewise
(cmd_curframe): likewise
(cmd_delete): likewise
(cmd_echo): likewise
(cmd_escape): likewise
(cmd_exec): likewise
(cmd_fdump): likewise
(cmd_focusdown): likewise
(cmd_focuslast): likewise
(cmd_focusleft): likewise
(cmd_focusright): likewise
(cmd_focusup): likewise
(cmd_frestore): likewise
(cmd_fselect): likewise
(cmd_gdelete): likewise
(cmd_getenv): likewise
(cmd_gmerge): likewise
(cmd_gmove): likewise
(cmd_gnew): likewise
(cmd_gnewbg): likewise
(cmd_gnext): likewise
(cmd_gprev): likewise
(cmd_gravity): likewise
(cmd_groups): likewise
(cmd_gselect): likewise
(cmd_h_split): likewise
(cmd_help): likewise
(cmd_info): likewise
(cmd_kill): likewise
(cmd_last): likewise
(cmd_lastmsg): likewise
(cmd_license): likewise
(cmd_link): likewise
(cmd_listhook): likewise
(cmd_meta): likewise
(cmd_msgwait): likewise
(cmd_newwm): likewise
(cmd_next): likewise
(cmd_next_frame): likewise
(cmd_nextscreen): likewise
(cmd_number): likewise
(cmd_only): likewise
(cmd_other): likewise
(cmd_prev): likewise
(cmd_prev_frame): likewise
(cmd_prevscreen): likewise
(cmd_quit): likewise
(cmd_redisplay): likewise
(cmd_remhook): likewise
(cmd_remove): likewise
(cmd_rename): likewise
(cmd_resize): likewise
(cmd_restart): likewise
(cmd_rudeness): likewise
(cmd_select): likewise
(cmd_setenv): likewise
(cmd_shrink): likewise
(cmd_source): likewise
(cmd_startup_message): likewise
(cmd_time): likewise
(cmd_tmpwm): likewise
(cmd_unalias): likewise
(cmd_unbind): likewise
(cmd_unimplemented): likewise
(cmd_unmanage): likewise
(cmd_unsetenv): likewise
(cmd_v_split): likewise
(cmd_verbexec): likewise
(cmd_version): likewise
(cmd_warp): likewise
(cmd_windows): likewise
(cmd_readkey): likewise
(cmd_newkmap): likewise
(cmd_delkmap): likewise
(cmd_definekey): likewise
(cmd_undefinekey): likewise
(cmd_set): likewise
(cmd_sselect): likewise
(cmd_ratwarp): likewise
(cmd_ratclick): likewise
(cmd_ratrelwarp): likewise
(cmd_rathold): likewise
(cmd_cnext): likewise
(cmd_cother): likewise
(cmd_cprev): likewise
(cmd_dedicate): likewise
(cmd_describekey): likewise
(cmd_inext): likewise
(cmd_iother): likewise
(cmd_iprev): likewise
(cmd_prompt): likewise
(cmd_sdump): likewise
(cmd_sfdump): likewise
(cmd_undo): likewise
(cmd_putsel): likewise
(cmd_getsel): likewise
(set_resizeunit): arg is an array of struct cmdarg*. Return
cmdret*. Updated to use new parsed arguments.
(set_wingravity): likewise
(set_transgravity): likewise
(set_maxsizegravity): likewise
(set_bargravity): likewise
(set_font): likewise
(set_padding): likewise
(set_border): likewise
(set_barborder): likewise
(set_inputwidth): likewise
(set_waitcursor): likewise
(set_winfmt): likewise
(set_winname): likewise
(set_fgcolor): likewise
(set_bgcolor): likewise
(set_barpadding): likewise
(set_winliststyle): likewise
(set_framesels): likewise
(set_maxundos): likewise
* src/actions.h: include ratpoison.h
(argtype): add arg_FRAME, arg_WINDOW, arg_COMMAND, arg_SHELLCMD,
arg_KEYMAP, arg_KEY, arg_GRAVITY, arg_GROUP, arg_HOOK,
arg_VARIABLE.
(union arg_union): new union
(struct cmdarg): new struct
(struct argspec): likewise
(struct cmdret): likewise
(user_command): change func to reflect new command function
args. add num_args, ni_required_args, i_required_args.
(RP_CMD): new macro for prototyping command functions. all command
function prototypes updated to use this macro.
(init_user_commands): new prototype
(cmdret_free): likewise
* src/main.c (read_rc_file): handle cmdret* returned by command.
(main): call init_user_commands
* src/linkedlist.h (list_size): new prototype
* src/linkedlist.c (list_size): new function
* src/globals.h (RET_SUCCESS): new define
(RET_FAILURE): new define
* src/events.c (handle_key): handle the cmdret structure returned
by command.
(execute_remote_command): return cmdret*.
(receive_command): mark the command return string as error or
output before sending.
* src/data.h (struct rp_action): change data element type to char*
* src/communications.c (receive_command_result): print command
output to stderr if marked as an error.
|
|
to sbuf_nconcat.
(sbuf_nconcat): new function
* src/globals.c (init_globals): new function
* src/main.c (main): call init_globals.
* src/globals.c: include unistd.h.
(x_export_selection): new function
(set_nselection): likewise
(set_selection): call x_export_selection
(get_cut_buffer): new function
(get_primary_selection): likewise
(get_selection): likewise
* src/editor.c (editor_kill_word): add the deleted text to the X11
selection
(editor_backward_kill_word): likewise
(editor_kill_line): likewise
(backward_kill_line): new fuction
(editor_backward_kill_line): add the deleted text to the X11
selection. call backward_kill_line.
(paste_cut_buffer): remove function
(paste_primary_selection): likewise
(editor_paste_selection): call get_selection to get the X11
selection.
(editor_complete): call backward_kill_line instead of
editor_backward_kill_line.
* src/ratpoison.h: Include string.h. Include X11/XAtom.h.
* src/globals.c (selection): new global
(set_selection): new function
* src/events.c: include X11/Xmd.h
(selection_request): new function
(selection_clear): new function
(delegate_event): call selection_request and selection_clear for
SelectionRequest and SelectionClear events.
* src/actions.c (user_commands): remove duplicate focusprev entry. Add putsel. Add getsel.
(cmd_putsel): new function
(cmd_getsel): new function
* contrib/genrpbindings: add a missing paren to the elisp bindings.
|
|
(MESSAGE_NO_OTHER_FRAME): likewise
(MESSAGE_NO_MANAGED_WINDOWS): likewise
(MESSAGE_UNKNOWN_COMMAND): likewise
(MESSAGE_WINDOW_INFORMATION): likewise
(MESSAGE_RAISE_TRANSIENT): likewise
(MESSAGE_RAISE_WINDOW): likewise
(MESSAGE_MAP_TRANSIENT): likewise
(MESSAGE_MAP_WINDOW): likewise
(MESSAGE_WELCOME): likewise
(MESSAGE_FRAME_STRING): likewise
* src/main.c (init_defaults): set bar_x_padding to 4
* src/events.c (handle_signals): Remove padding space on all calls
to message and marked_message_printf.
* src/editor.c (editor_enter): Remove padding space on all calls
to message and marked_message_printf.
* src/actions.c: Remove padding space on all calls to message and
marked_message_printf.
* src/bar.c (get_mark_box): make the mark extend to the edge of
the box regardless of the bar padding.
|
|
|
|
|
|
|
|
output.
(hide_transient_for_between): likewise.
* src/manage.c (get_wmname): typecast name when passing to
xstrdup.
* src/main.c (main): typecast command[i] when passing to
send_command.
* src/events.c (execute_remote_command): typecast req[1] when
passing to command.
(receive_command): typecast result when passing to
XChangeProperty.
* src/editor.c (editor_history_previous): Add newline to
debugging output.
(editor_history_next): likewise.
(paste_primary_selection): typecast data when passing to editor_insert.
* src/communications.c (receive_command_result): typecast result
when passing to strlen.
(send_command): typecast cmd when passing the XChangeProperty.
* src/actions.c (user_commands): add focusprev
(cmd_prev): clean up
(cmd_next): likewise
(cmd_prev_frame): call find_frame_prev instead of find_frame_next.
(cmd_frestore): grab the frame's number first when processing the
frames.
|
|
window in. All callers updated.
(group_prev_window): make sure the matched window is in the same
screen as win.
(group_next_window): likewise
* src/window.c (find_window_other): add argument, the screen to
find the window in. All callers updated.
|
|
receive_command.
(receive_command): take a root window as an argument and use it to
listen for the command.
|
|
* src/screen.c (is_a_root_window): new function
* src/events.c (property_notify): check for ratpoison commands on
every root window, not just the default root window.
* src/communications.c (send_command): store the root window in a
variable, root. and use it whenever the root window is needed.
|