[mutter] window: Fix get_input_rect in a hacky way
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] window: Fix get_input_rect in a hacky way
- Date: Mon, 16 Jun 2014 22:34:33 +0000 (UTC)
commit 9d5273bb1516cb863bbb9ac2bcb73bd5c9c93cc8
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Mon Jun 16 18:28:18 2014 -0400
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.
src/core/window.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index 4461cab..7b3d6c8 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]