Bugfix: Fix clicking on stack windows in tabbed mode (Thanks Atsutane)
This commit is contained in:
parent
06762bba61
commit
cef5778097
@ -300,9 +300,16 @@ static bool button_press_stackwin(xcb_connection_t *conn, xcb_button_press_event
|
|||||||
i3Font *font = load_font(conn, config.font);
|
i3Font *font = load_font(conn, config.font);
|
||||||
int decoration_height = (font->height + 2 + 2);
|
int decoration_height = (font->height + 2 + 2);
|
||||||
int destination = (event->event_y / decoration_height),
|
int destination = (event->event_y / decoration_height),
|
||||||
c = 0;
|
c = 0,
|
||||||
|
num_clients = 0;
|
||||||
Client *client;
|
Client *client;
|
||||||
|
|
||||||
|
CIRCLEQ_FOREACH(client, &(stack_win->container->clients), clients)
|
||||||
|
num_clients++;
|
||||||
|
|
||||||
|
if (stack_win->container->mode == MODE_TABBED)
|
||||||
|
destination = (event->event_x / (stack_win->container->width / num_clients));
|
||||||
|
|
||||||
LOG("Click on stack_win for client %d\n", destination);
|
LOG("Click on stack_win for client %d\n", destination);
|
||||||
CIRCLEQ_FOREACH(client, &(stack_win->container->clients), clients)
|
CIRCLEQ_FOREACH(client, &(stack_win->container->clients), clients)
|
||||||
if (c++ == destination) {
|
if (c++ == destination) {
|
||||||
|
Loading…
Reference in New Issue
Block a user