summaryrefslogtreecommitdiff
path: root/src/bar.c
AgeCommit message (Collapse)Author
2016-11-17Add xrandr supportMathieu OTHACEHE
Drop deprecated xinerama support and replace it with xrandr. Signed-off-by: Mathieu OTHACEHE <m.othacehe@gmail.com>
2014-03-24Factorize code in update_{window,group}_names.Jérémie Courrèges-Anglas
2014-03-24Kill unused and forgotten include of assert.h in bar.cJérémie Courrèges-Anglas
2013-05-26Adapt group bar to be updated on group number or name change.cr/implement_gnumber-with_winliststylecos
2013-05-26draw_string: only call rp_text_width when neededJérémie Courrèges-Anglas
2013-05-26draw_string: more cleanup and clarificationsJérémie Courrèges-Anglas
rename "update" to "print_reason" and use #defined flags instead of magic numbers
2013-05-26draw_string: document variablesJérémie Courrèges-Anglas
2013-05-26feed draw_partial_string with a string and a lengthJérémie Courrèges-Anglas
makes it easier to call along with rp_text_width
2013-05-26draw_string: indentationJérémie Courrèges-Anglas
2013-05-26fix draw_string when winliststyle is "row"Jérémie Courrèges-Anglas
bug introduced in 14beabe
2013-05-26sync comment with realityJérémie Courrèges-Anglas
2013-04-10free_bar: make this function reusableJérémie Courrèges-Anglas
* set last_msg to NULL after freeing it * no need to test for last_msg being NULL before freeing it (likewise in update_last_message)
2013-04-10Get rid of several unused variablesJérémie Courrèges-Anglas
* cmd_definekey: actually use cmd * cmd_meta: remove ev1 * cmd_resize: remove nbytes * cmd_ratrelwarp: remove s * draw_string: remove lgv, lgc, mask; lgc wasn't XFreeGC'ed * get_more_input: remove nbytes * cleanup_frame: remove last_win * get_window_list: remove other_window Patch from Bernhard R. Link
2013-02-06rp_text_width: remove "font" argumentJérémie Courrèges-Anglas
* (globals.[ch]): remove rp_text_width "font" arg, since its value is always the global variable defaults.font (non-Xft case). remove one #ifdef while here * update rp_text_width() calls to match new signature
2009-07-15silence warnings about signed/unsigned char mismatchBernhard R. Link
2009-07-04fix inverted text when using xftwinliststyle-row_brokenShawn Betts
Now the inverted rectangle is drawn first and the text overtop in the bg color.
2008-05-25properly indent calls to rp_text_width and rp_draw_stringShawn
2008-05-25change -1 to the proper string length in some calls to rp_text_width and ↵Shawn
rp_draw_string
2008-05-24Add xft supportMidare Kiyura
2007-03-08* src/split.c (set_active_frame): call switch_frame hooksabetts
(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
2006-12-14*** empty log message ***sabetts
2006-11-18(bar_y): take into account screen paddingsabetts
(bar_x): likewise
2006-09-26* src/manage.c (update_window_name): return 1 if anything changed. 0 otherwise.sabetts
* 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
2006-08-24(prepare_bar): cap the width and height to the size ofsabetts
the screen.
2006-05-24* src/xinerama.c (free_xinerama): take void arguments. prototype updated.sabetts
(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
2006-04-29* src/bar.c (marked_message): print NULL if msg is null in debug outputsabetts
* src/actions.c (cmd_getenv): return an empty string for nonexistant env vars. (command): print NULL if rest is null in debug output
2006-04-20* src/split.c (show_frame_message): use XmbDrawString and XmbTextEscapementsabetts
* src/screen.c (init_screen): don't include the font in the gc * src/ratpoison.h: include Xlocale.h * src/manage.c (get_wmname): support i18n characters * src/main.c (init_defaults): call load_query_font_set and set_extents_of_fontset (main): call setlocale (clean_up): call XFreeFontSet (set_extents_of_fontset): new function (load_query_font_set): likewise * src/input.c (update_input_window): use XmbTextEscapement and XmbDrawString * src/globals.h (FONT_HEIGHT): use rp_font_ascent and rp_font_descent (MAX_FONT_WIDTH): use rp_font_width new globals rp_font_ascent, rp_font_descent, rp_font_width * src/globals.c: new globals rp_font_ascent, rp_font_descent, rp_font_width * src/data.h (struct rp_defaults): font is a XFontSet * src/bar.c (max_line_length): call XmbTextEscapement (draw_string): call XmbDrawString (get_mark_box): call XmbTextEscapement * src/actions.c (read_frame): call XmbTextEscapement (cmd_license): likewise (read_frame): call XmbDrawString (cmd_license): likewise (cmd_help): likewise (update_gc): don't include the font (set_font): call load_query_font_set
2006-03-16* src/window.c (_XOPEN_SOURCE): new definesabetts
* src/screen.c (is_a_root_window): w is unsigned int (init_screen): typecast _net_wm_pid as unsigned char*. * src/main.c (read_rc_file): linesize is size_t * src/frame.c (frame_read): use a temp var when reading the :dedicated value. * src/bar.c (max_line_length): i and start are size_t (draw_string): i is size_t (get_mark_box): mark_start and mark_end are size_t * src/actions.c (find_keybinding): state is unsigned int (remove_keybinding): likewise (frame_selector): n is unsigned int (frame_selector_match): i is size_t. typecast comparison as size_t.
2006-03-16remove tabs and trailing whitespace.sabetts
2006-03-15* src/bar.c (show_bar): accept a fmt argument. all callers and prototype ↵sabetts
updated. (update_bar): just display the last message if bar isn't hidden. (update_window_names): accept a fmt argument. all callers and prototype updated. * src/actions.c (init_user_commands): add optional argument to "info" (cmd_info): handle optional argument (cmd_windows): when called interactively use the argument as the format string.
2004-12-09* src/messages.h (MESSAGE_NO_OTHER_WINDOW): remove padding spacessabetts
(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.
2004-12-04update copyright.sabetts
2004-12-02Updated copyright notices.sabetts
2004-11-03(blank_frame): use the frames screen, not the current screen.sabetts
2004-02-27* src/window.c (give_window_focus): save the mouse position beforesabetts
checking if win is NULL. (give_window_focus): set rp_current_screen to xine_screen_num of the window's screen. (set_active_window): when using xinerama get the frame from the current screen. * src/split.c (set_frames_window): update the window's scr attribute to point to the frame's screen. (find_window_for_frame): when xinerama is being used search all windows. (set_active_frame): update rp_current_screen to point to the frame's screen. * src/screen.h (init_screens): new prototype (is_rp_window_for_screen): likewise * src/screen.c: include string.h and X11/cursorfont.h (init_screens): new function (is_rp_window_for_screen): new function. (init_screen): fill in xine_screen_num when using xinerama. * src/ratpoison.h: include xinerama.h * src/manage.c (current_screen): use xine_screen_num to find the current screen. (scanwins): use is_rp_window_for_screen to skip over ratpoison windows. (scanwins): when using xinerama only manage windows inside the viewable area. * src/main.c (main): call init_xinerama and init_screens. Move screen initing code to these functions. (init_rat_cursor): move to screen.c (init_screen): likewise (find_screen): likewise (clean_up): call free_xinerama * src/group.c (group_last_window): only check windows in the current screen, unless xinerama is being used in which case all windows are accessible. (group_next_window): likewise (group_prev_window): likewise * src/globals.h: new globals rp_have_xinerama, xine_screen_num. * src/events.c (new_window): when using xinerama, the new window's screen is the current screen. (key_press): when using xinerama, use the current screen. * src/data.h (struct rp_screen): remove root_attr and add left, top, width, height. All dependant code updated. Add xine_screen_num. * src/actions.c (cmd_remove): show the frame indicator in the new current frame after removing the frame. * src/Makefile.am (ratpoison_SOURCES): add xinerama.c and xinerama.h
2003-09-21(prepare_bar): move and resize the window before mapping it.sabetts
2003-08-11(prepare_bar): just use height for the height of the window.sabetts
(marked_message): add the padding to the height of the window.
2003-08-10(get_mark_box): take the bar padding into account whensabetts
calculate the top of the highlight bar.
2003-06-02* src/group.c (groups_merge): don't merge a group with itself.sabetts
* src/bar.c (draw_mark): abort if mark_end is the beginning of the line or the start and end of the mark is the same.
2003-05-25* src/window.c: do not include ctype.hsabetts
* src/ratpoison.h (str_comp): new prototype * src/messages.h (MESSAGE_PROMPT_SWITCH_TO_GROUP): new define * src/main.c: include ctype.h (str_comp): moved from window.c * src/group.h (groups_find_group_by_name): new prototype. (groups_find_group_by_number): likewise. (groups_merge): likewise (group_move_window): likewise * src/group.c: include string.h (group_new): new argument, name. All callers updated. prototype updated. (init_groups): create the first group with DEFAULT_GROUP_NAME as its name. (group_new): new argument, name. All callers updated. Prototype updated. (group_free): free the group's name. (group_add_new_group): new argument, name. All callers updated. Prototype updated. (groups_find_group_by_name): new function (groups_find_group_by_number): likewise (group_move_window): likewise (groups_merge): likewise * src/conf.h (DEFAULT_GROUP_NAME): new define * src/actions.h (cmd_gselect): new prototype (cmd_groups): likewise (cmd_gmove): likewise (cmd_gmerge): likewise (cmd_gnewbg): likewise * src/actions.c (user_commands): new commands gselect, groups, gmove, gmerge, gnewbg. (cmd_gnewbg): new function (find_group): likewise (cmd_gselect): likewise (cmd_groups): likewise (cmd_gmove): likewise (cmd_gmerge): likewise
2003-05-25* src/bar.c (reset_alarm): new functionsabetts
(show_bar): call reset_alarm() (count_lines): make function static. clean up code. (max_line_length): likewise (pos_in_line): likewise (line_beginning): likewise (draw_string): new static function (correct_mark): likewise (prepare_bar): likewise (get_mark_box): likewise (draw_inverse_box): likewise (draw_mark): likewise (update_last_message): likewise (marked_message): Move most of the code to seperate function calls. Call reset_alarm(), prepare_bar(), draw_string(), correct_mark(), draw_mark(), and update_last_message(). * src/actions.c (cmd_select): fix crash bug. * src/window.c (get_window_list): mark_end is the length of the string. Don't do a special case if the window list is being displayed as a column.
2003-05-25(read_key): Do not wait for the key releasesabetts
event. Remove gobble_rel argument. Callers updated.
2003-05-20 * src/linkedlist.h: Move all C function to linkedlist.csabetts
* src/window.c (find_window): add debugging output describing which window list the window was found in. * src/group.c (group_new): assign the group's number the number passed as an argument. * src/events.c (destroy_window): withdraw iconified and normal windows before unmanaging them. (handle_signals): delete the node from the list before freeing it. * src/bar.h (message): remove define. (marked_wrapped_message): remove prototype (message): new prototype * src/bar.c (message): new function (marked_wrapped_message): renamed to marked_message. remove marked_message.
2003-05-18(marked_wrapped_message): Free the GC's created withsabetts
XCreateGC.
2003-05-15(struct rp_screen): rename fromsabetts
screen_info. Dependant code updated.
2003-05-09* src/manage.h (clear_unmanaged_list): new prototypesabetts
(list_unmanaged_windows): likewise (add_unmanaged_window): likewise * src/manage.c (unmanaged_window_list): no longer a const. (num_unmanaged_windows): new static global (clear_unmanaged_list): new function (list_unmanaged_windows): likewise (add_unmanaged_window): likewise (unmanaged_window): use num_unmanaged_windows to tell how many elements are in the unmanaged list. * src/actions.h (cmd_unmanage): new prototype (cmd_clrunmanaged): likewise * src/actions.c (user_commands): new commands unmanage, clrunmanaged. (cmd_unmanage): new function (cmd_clrunmanaged): likewise * src/bar.c (BAR_IS_HIDDEN): new define. (update_bar): new function. * src/actions.c (cmd_frestore): call update_bar() instead of update_window_names(). * src/actions.c (cmd_frestore): update the window list after restoring the frames.
2003-05-09* src/split.c (split_frame): call update_bar() instead ofsabetts
update_window_names(). (set_active_frame): likewise (blank_frame): likewise * src/bar.h (update_bar): new prototype. * src/bar.c (BAR_IS_HIDDEN): new define. (update_bar): new function. * src/actions.c (cmd_frestore): call update_bar() instead of update_window_names(). * src/split.c (set_active_frame): update the window list after switching frames. (blank_frame): update the window list after blanking the screen. * src/actions.c (cmd_frestore): update the window list after restoring the frames. * src/split.c (split_frame): update the window list after the split.
2003-04-08* src/Makefile.am (ratpoison_SOURCES): add linkedlist.hsabetts
* src/bar.c (marked_message): pass correct arguments to bar_y. * src/actions.c (cmd_defwinliststyle): error messages print the correct command name.
2003-04-06* src/bar.c (marked_wrapped_message): make the marked line spansabetts
the whole line. * src/actions.c (cmd_number): update any frames pointing to the windows that have changed.
2003-04-06* src/window.c (get_window_list): if window_list_style is STYLE_COLUMN thensabetts
the end of the mark is the length of the buffer minus the start of the mark. * src/main.c (init_defaults): init window_list_style to STYLE_ROW. * src/data.h (struct rp_defaults): new member, window_list_style. * src/bar.c (bar_y): new argument, height. All callers updated. (bar_y): use height in calculations. (update_window_names): print a column of windows if defaults.window_list_style is in column mode. (count_lines): new function (max_line_length): likewise (pos_in_line): likewise (line_beginning): likewise (marked_wrapped_message): likewise * src/actions.c (user_commands): new commands 'verbexec' and 'defwinliststyle'. Move @end take to after the def* commands. (cmd_verbexec): new function. Added prototype. (cmd_defwinliststyle): likewise