diff options
author | sabetts <sabetts> | 2003-02-23 01:40:42 +0000 |
---|---|---|
committer | sabetts <sabetts> | 2003-02-23 01:40:42 +0000 |
commit | 49ca20c9fc7807d612ef9925c110e8da6c3c1a8f (patch) | |
tree | f532251c2f3835e9ecd81f46e17900e95603be52 /src/manage.c | |
parent | 5e4c6e4a9729e1ec546535cfc6ee264768c6b987 (diff) | |
download | ratpoison-49ca20c9fc7807d612ef9925c110e8da6c3c1a8f.zip |
* configure.in: don't check for variable argument support in
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
Diffstat (limited to 'src/manage.c')
-rw-r--r-- | src/manage.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/manage.c b/src/manage.c index 5306a1c..9c62a66 100644 --- a/src/manage.c +++ b/src/manage.c @@ -77,13 +77,13 @@ update_normal_hints (rp_window *win) /* Print debugging output for window hints. */ #ifdef DEBUG if (win->hints->flags & PMinSize) - PRINT_DEBUG ("minx: %d miny: %d\n", win->hints->min_width, win->hints->min_height); + PRINT_DEBUG (("minx: %d miny: %d\n", win->hints->min_width, win->hints->min_height)); if (win->hints->flags & PMaxSize) - PRINT_DEBUG ("maxx: %d maxy: %d\n", win->hints->max_width, win->hints->max_height); + PRINT_DEBUG (("maxx: %d maxy: %d\n", win->hints->max_width, win->hints->max_height)); if (win->hints->flags & PResizeInc) - PRINT_DEBUG ("incx: %d incy: %d\n", win->hints->width_inc, win->hints->height_inc); + PRINT_DEBUG (("incx: %d incy: %d\n", win->hints->width_inc, win->hints->height_inc)); #endif } @@ -99,13 +99,13 @@ get_wmname (Window w) if (!XGetWMName (dpy, w, &text)) { - PRINT_DEBUG ("I can't get the WMName.\n"); + PRINT_DEBUG (("I can't get the WMName.\n")); return NULL; } if (!XTextPropertyToStringList (&text, &name_list, &list_len)) { - PRINT_DEBUG ("Error retrieving TextList.\n"); + PRINT_DEBUG (("Error retrieving TextList.\n")); return NULL; } @@ -134,7 +134,7 @@ get_class_hints (Window w) if (class == NULL) { - PRINT_ERROR ("Not enough memory for WM_CLASS structure.\n"); + PRINT_ERROR (("Not enough memory for WM_CLASS structure.\n")); exit (EXIT_FAILURE); } @@ -305,7 +305,7 @@ scanwins(screen_info *s) Window dw1, dw2, *wins; XQueryTree(dpy, s->root, &dw1, &dw2, &wins, &nwins); - PRINT_DEBUG ("windows: %d\n", nwins); + PRINT_DEBUG (("windows: %d\n", nwins)); for (i = 0; i < nwins; i++) { @@ -320,7 +320,7 @@ scanwins(screen_info *s) win = add_to_window_list (s, wins[i]); - PRINT_DEBUG ("map_state: %d\n", attr.map_state); + PRINT_DEBUG (("map_state: %d\n", attr.map_state)); /* Collect mapped and iconized windows. */ if (attr.map_state == IsViewable @@ -466,8 +466,8 @@ maximize_transient (rp_window *win) /* Fit the window inside its frame (if it has one) */ if (frame) { - PRINT_DEBUG ("frame width=%d height=%d\n", - frame->width, frame->height); + PRINT_DEBUG (("frame width=%d height=%d\n", + frame->width, frame->height)); if (maxx + win->border * 2 > frame->width) maxx = frame->width - win->border * 2; if (maxy + win->border * 2 > frame->height) maxy = frame->height - win->border * 2; @@ -493,7 +493,7 @@ maximize_transient (rp_window *win) maxy = amount + win->height; } - PRINT_DEBUG ("maxsize: %d %d\n", maxx, maxy); + PRINT_DEBUG (("maxsize: %d %d\n", maxx, maxy)); win->width = maxx; win->height = maxy; @@ -531,8 +531,8 @@ maximize_normal (rp_window *win) /* Fit the window inside its frame (if it has one) */ if (frame) { - PRINT_DEBUG ("frame width=%d height=%d\n", - frame->width, frame->height); + PRINT_DEBUG (("frame width=%d height=%d\n", + frame->width, frame->height)); if (maxx > frame->width) maxx = frame->width - win->border * 2; if (maxy > frame->height) maxy = frame->height - win->border * 2; @@ -558,7 +558,7 @@ maximize_normal (rp_window *win) maxy = amount + win->height; } - PRINT_DEBUG ("maxsize: %d %d\n", maxx, maxy); + PRINT_DEBUG (("maxsize: %d %d\n", maxx, maxy)); win->width = maxx; win->height = maxy; @@ -581,8 +581,8 @@ maximize (rp_window *win) /* Reposition the window. */ move_window (win); - PRINT_DEBUG ("Resizing window '%s' to x:%d y:%d w:%d h:%d\n", window_name (win), - win->x, win->y, win->width, win->height); + PRINT_DEBUG (("Resizing window '%s' to x:%d y:%d w:%d h:%d\n", window_name (win), + win->x, win->y, win->width, win->height)); /* Actually do the maximizing. */ @@ -631,7 +631,7 @@ force_maximize (rp_window *win) void map_window (rp_window *win) { - PRINT_DEBUG ("Mapping the unmapped window %s\n", window_name (win)); + PRINT_DEBUG (("Mapping the unmapped window %s\n", window_name (win))); /* Fill in the necessary data about the window */ update_window_information (win); @@ -715,7 +715,7 @@ withdraw_window (rp_window *win) { if (win == NULL) return; - PRINT_DEBUG ("withdraw_window on '%s'\n", window_name (win)); + PRINT_DEBUG (("withdraw_window on '%s'\n", window_name (win))); /* Give back the window number. the window will get another one, if it is remapped. */ |