Skip to content

Commit

Permalink
win: rename win_get_name to win_update_name
Browse files Browse the repository at this point in the history
Make explicit the fact that it modifies the win struct.

Signed-off-by: Yuxuan Shui <[email protected]>
  • Loading branch information
yshui committed Sep 23, 2019
1 parent 1a1540a commit 8628e49
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ static inline void ev_property_notify(session_t *ps, xcb_property_notify_event_t
if (ps->o.track_wdata &&
(ps->atoms->aWM_NAME == ev->atom || ps->atoms->a_NET_WM_NAME == ev->atom)) {
auto w = find_toplevel(ps, ev->window);
if (w && 1 == win_get_name(ps, w)) {
if (w && win_update_name(ps, w) == 1) {
win_on_factor_change(ps, w);
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/win.c
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ static bool attr_pure win_has_rounded_corners(const struct managed_win *w) {
return false;
}

int win_get_name(session_t *ps, struct managed_win *w) {
int win_update_name(session_t *ps, struct managed_win *w) {
XTextProperty text_prop = {NULL, XCB_NONE, 0, 0};
char **strlst = NULL;
int nstr = 0;
Expand Down Expand Up @@ -974,7 +974,7 @@ void win_mark_client(session_t *ps, struct managed_win *w, xcb_window_t client)

// Get window name and class if we are tracking them
if (ps->o.track_wdata) {
win_get_name(ps, w);
win_update_name(ps, w);
win_get_class(ps, w);
win_get_role(ps, w);
}
Expand Down
2 changes: 1 addition & 1 deletion src/win.h
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ bool must_use destroy_win_start(session_t *ps, struct win *w);
/// Release images bound with a window, set the *_NONE flags on the window. Only to be
/// used when de-initializing the backend outside of win.c
void win_release_images(struct backend_base *base, struct managed_win *w);
int win_get_name(session_t *ps, struct managed_win *w);
int win_update_name(session_t *ps, struct managed_win *w);
int win_get_role(session_t *ps, struct managed_win *w);
winmode_t attr_pure win_calc_mode(const struct managed_win *w);
void win_set_shadow_force(session_t *ps, struct managed_win *w, switch_t val);
Expand Down

0 comments on commit 8628e49

Please sign in to comment.