window: Fix get_input_rect in a hacky way
All of the users of get_input_rect don't actually want a synthesized input rect based off of the current margins. What they really want is the last-configured size of the toplevel window. Since we don't properly track this anymore in the generic MetaWindow, use XGetWindowAttributes to fetch a server-side rectangle. This is a bad layer violation, but since the window geometry code will have to be rewritten anyway for the Wayland set_window_geometry, let's just push a hacky fix for now.
This commit is contained in:
parent
3c0fae74f1
commit
9d5273bb15
@ -4051,6 +4051,17 @@ meta_window_get_input_rect (const MetaWindow *window,
|
||||
{
|
||||
if (window->frame)
|
||||
*rect = window->frame->rect;
|
||||
else if (window->xwindow != None)
|
||||
{
|
||||
XWindowAttributes xwa;
|
||||
|
||||
XGetWindowAttributes (window->display->xdisplay, window->xwindow, &xwa);
|
||||
|
||||
rect->x = xwa.x;
|
||||
rect->y = xwa.y;
|
||||
rect->width = xwa.width;
|
||||
rect->height = xwa.height;
|
||||
}
|
||||
else
|
||||
{
|
||||
*rect = window->rect;
|
||||
|
Loading…
Reference in New Issue
Block a user