Skip to content

Commit

Permalink
tray: Remove calculate_client_x
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick96 committed Apr 15, 2022
1 parent bdfe655 commit 9ad73da
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
1 change: 0 additions & 1 deletion include/x11/tray_manager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ class tray_manager : public xpp::event::sink<evt::expose, evt::visibility_notify
unsigned short int calculate_w() const;
unsigned short int calculate_h() const;

int calculate_client_x(const xcb_window_t& win);
int calculate_client_y();

bool is_embedded(const xcb_window_t& win) const;
Expand Down
14 changes: 1 addition & 13 deletions src/x11/tray_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ void tray_manager::setup() {
m_opts.foreground = conf.get(bs, "tray-foreground", m_bar_opts.foreground);

if (m_opts.background.alpha_i() != 255) {
m_log.trace("tray: enable transparency");
m_log.info("tray: enable transparency");
m_opts.transparent = true;
}

Expand Down Expand Up @@ -773,18 +773,6 @@ unsigned short int tray_manager::calculate_h() const {
return m_opts.win_size.h;
}

/**
* Calculate x position of client window
*/
int tray_manager::calculate_client_x(const xcb_window_t& win) {
for (unsigned int i = 0; i < m_clients.size(); i++) {
if (m_clients[i].match(win)) {
return m_opts.spacing + m_opts.client_size.w * i;
}
}
return m_opts.spacing;
}

/**
* Calculate y position of client window
*/
Expand Down

0 comments on commit 9ad73da

Please sign in to comment.