Skip to content

Commit

Permalink
get an extra use of drw vs DRW
Browse files Browse the repository at this point in the history
  • Loading branch information
ntBre committed Dec 3, 2023
1 parent 7bf78e1 commit faaf5d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2862,9 +2862,9 @@ fn buttonpress(dpy: &Display, e: *mut XEvent) {
let mut x = 0;
let mut i = 0;
// do while with ++i in condition
x += DRW.as_ref().unwrap().textw(TAGS[i]);
i += 1;
let drw = &DRW.as_ref().unwrap();
x += drw.textw(TAGS[i]);
i += 1;
while ev.x >= x as i32 && i < TAGS.len() {
x += drw.textw(TAGS[i]);
i += 1;
Expand Down

0 comments on commit faaf5d5

Please sign in to comment.