Bugfix: Send clients their absolute position/size in generated configure events, not relative

This fixes ticket #26.
This commit is contained in:
Michael Stapelberg
2009-04-11 22:37:48 +02:00
parent b7e8a63474
commit a2d20b6848
5 changed files with 29 additions and 6 deletions

View File

@ -212,6 +212,22 @@ void fake_configure_notify(xcb_connection_t *conn, Rect r, xcb_window_t window)
LOG("Told the client it is at %dx%d with %dx%d\n", r.x, r.y, r.width, r.height);
}
/*
* Generates a configure_notify_event with absolute coordinates (relative to the X root
* window, not to the clients frame) for the given client.
*
*/
void fake_absolute_configure_notify(xcb_connection_t *conn, Client *client) {
Rect absolute;
absolute.x = client->rect.x;
absolute.y = client->rect.y;
absolute.width = client->rect.width - client->child_rect.x;
absolute.height = client->rect.height - client->child_rect.y;
fake_configure_notify(conn, absolute, client->child);
}
/*
* Finds out which modifier mask is the one for numlock, as the user may change this.
*