Bugfix: load current_col/current_row from workspace when setting focus (Thanks Mirko)

In the case of floating clients which have no container, the values
were still the ones from your old workspace, which was a problem if
your dimensions didn’t match…
This commit is contained in:
Michael Stapelberg 2009-06-23 23:10:04 +02:00
parent 4f31709b1d
commit 81e9d8282a
1 changed files with 3 additions and 0 deletions

View File

@ -319,6 +319,9 @@ void set_focus(xcb_connection_t *conn, Client *client, bool set_anyways) {
c_ws->current_row = current_row; c_ws->current_row = current_row;
c_ws->current_col = current_col; c_ws->current_col = current_col;
c_ws = client->workspace; c_ws = client->workspace;
/* Load current_col/current_row if we switch to a client without a container */
current_col = c_ws->current_col;
current_row = c_ws->current_row;
/* Update container */ /* Update container */
if (client->container != NULL) { if (client->container != NULL) {