Skip to content

Commit

Permalink
Delete more unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
jcourreges committed Sep 18, 2017
1 parent 1f8a8e4 commit b57eea9
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 126 deletions.
24 changes: 0 additions & 24 deletions src/frame.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,30 +112,6 @@ frame_resize_down (rp_frame *frame, int amount)
frame->height += amount;
}

void
frame_move_left (rp_frame *frame, int amount)
{
frame->x -= amount;
}

void
frame_move_right (rp_frame *frame, int amount)
{
frame->x += amount;
}

void
frame_move_up (rp_frame *frame, int amount)
{
frame->y -= amount;
}

void
frame_move_down (rp_frame *frame, int amount)
{
frame->y += amount;
}

static void
init_frame (rp_frame *f)
{
Expand Down
4 changes: 0 additions & 4 deletions src/frame.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@
#ifndef FRAME_H
#define FRAME_H

void frame_move_down (rp_frame *frame, int amount);
void frame_move_up (rp_frame *frame, int amount);
void frame_move_right (rp_frame *frame, int amount);
void frame_move_left (rp_frame *frame, int amount);
void frame_resize_down (rp_frame *frame, int amount);
void frame_resize_up (rp_frame *frame, int amount);
void frame_resize_right (rp_frame *frame, int amount);
Expand Down
1 change: 0 additions & 1 deletion src/history.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ ssize_t getline (char **lineptr, size_t *n, FILE *f);

void history_load (void);
void history_save (void);
void history_resize (int size);
void history_reset (void);
void history_add (int, const char *item);
const char *history_next (int);
Expand Down
37 changes: 0 additions & 37 deletions src/manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,26 +327,6 @@ update_window_name (rp_window *win)
return changed;
}

/* Send an artificial configure event to the window. */
void
send_configure (Window w, int x, int y, int width, int height, int border)
{
XConfigureEvent ce;

ce.type = ConfigureNotify;
ce.event = w;
ce.window = w;
ce.x = x;
ce.y = y;
ce.width = width;
ce.height = height;
ce.border_width = border;
ce.above = None;
ce.override_redirect = 0;

XSendEvent (dpy, w, False, StructureNotifyMask, (XEvent*)&ce);
}

/* This function is used to determine if the window should be treated
as a transient. */
int
Expand Down Expand Up @@ -908,23 +888,6 @@ unhide_all_windows (void)
unhide_window (win);
}

/* same as unhide_window except that it makes sure the window is mapped
on the bottom of the window stack. */
void
unhide_window_below (rp_window *win)
{
if (win == NULL) return;

/* Always lower the window, but if its not iconic we don't need to
map it since it already is mapped. */
XLowerWindow (dpy, win->w);

if (win->state != IconicState) return;

XMapWindow (dpy, win->w);
set_state (win, NormalState);
}

void
withdraw_window (rp_window *win)
{
Expand Down
2 changes: 0 additions & 2 deletions src/manage.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ void unmanage (rp_window *w);
int update_window_name (rp_window *win);
void update_normal_hints (rp_window *win);
void rename_current_window (void);
void send_configure (Window w, int x, int y, int width, int height, int border);
void set_state (rp_window *win, int state);
long get_state (rp_window *win);

Expand All @@ -52,7 +51,6 @@ void grab_keys_all_wins (void);
void hide_window (rp_window *win);
void unhide_window (rp_window *win);
void unhide_all_windows (void);
void unhide_window_below (rp_window *win);
void withdraw_window (rp_window *win);
void hide_others (rp_window *win);
void hide_screen_windows (rp_screen *s);
Expand Down
52 changes: 0 additions & 52 deletions src/window.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,12 +263,6 @@ find_window (Window w)
return win;
}

void
set_current_window (rp_window *win)
{
set_frames_window (current_frame(), win);
}

rp_window *
find_window_number (int n)
{
Expand Down Expand Up @@ -310,58 +304,12 @@ find_window_name (char *name, int exact_match)
return NULL;
}

/* Return the previous window in the list. Assumes window is in the
mapped window list. */
rp_window*
find_window_prev (rp_window *w)
{
rp_window *cur;

if (!w) return NULL;

for (cur = list_prev_entry (w, &rp_mapped_window, node);
cur != w;
cur = list_prev_entry (cur, &rp_mapped_window, node))
{
if (!find_windows_frame (cur))
{
return cur;
}
}

return NULL;
}

/* Return the next window in the list. Assumes window is in the mapped
window list. */
rp_window*
find_window_next (rp_window *w)
{
rp_window *cur;

if (!w) return NULL;

for (cur = list_next_entry (w, &rp_mapped_window, node);
cur != w;
cur = list_next_entry (cur, &rp_mapped_window, node))
{
if (!find_windows_frame (cur))
{
return cur;
}
}

return NULL;
}

rp_window *
find_window_other (rp_screen *screen)
{
return group_last_window (rp_current_group, screen);
}



/* Assumes the list is sorted by increasing number. Inserts win into
to Right place to keep the list sorted. */
void
Expand Down
6 changes: 0 additions & 6 deletions src/window.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,14 @@ void give_window_focus (rp_window *win, rp_window *last_win);
void set_active_window (rp_window *win);
void set_active_window_force (rp_window *win);
void goto_window (rp_window *win);
void set_current_window (rp_window *win);
void update_window_gravity (rp_window *win);
char *window_name (rp_window *win);

/* int goto_window_name (char *name); */
rp_window *find_window_other (rp_screen *screen);
rp_window *find_window_by_number (int n);
rp_window *find_window_name (char *name, int exact_match);
rp_window *find_window_prev (rp_window *w);
rp_window *find_window_prev_with_frame (rp_window *w);
rp_window *find_window_next (rp_window *w);
rp_window *find_window_next_with_frame (rp_window *w);
rp_window *find_window_number (int n);
void sort_window_list_by_number (void);

void insert_into_list (rp_window *win, struct list_head *list);

Expand Down

0 comments on commit b57eea9

Please sign in to comment.