[PATCH 2/2] xwayland: Update screen dimension on geometry changes
Olivier Fourdan
ofourdan at redhat.com
Fri Nov 13 08:57:23 PST 2015
If the existing outputs are arranged to a different layout, the screen
dimension need to be updated as it depends on the actual layout.
So update the screen dimension on geometry changes as well.
Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>
---
hw/xwayland/xwayland-output.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/hw/xwayland/xwayland-output.c b/hw/xwayland/xwayland-output.c
index 39893e7..47ffc2e 100644
--- a/hw/xwayland/xwayland-output.c
+++ b/hw/xwayland/xwayland-output.c
@@ -151,7 +151,9 @@ output_handle_geometry(void *data, struct wl_output *wl_output, int x, int y,
int physical_width, int physical_height, int subpixel,
const char *make, const char *model, int transform)
{
- struct xwl_output *xwl_output = data;
+ struct xwl_output *it, *xwl_output = data;
+ struct xwl_screen *xwl_screen = xwl_output->xwl_screen;
+ int width = 0, height = 0;
RROutputSetPhysicalSize(xwl_output->randr_output,
physical_width, physical_height);
@@ -161,6 +163,11 @@ output_handle_geometry(void *data, struct wl_output *wl_output, int x, int y,
xwl_output->y = y;
xwl_output->rotation = wl_transform_to_xrandr(transform);
+
+ xorg_list_for_each_entry(it, &xwl_screen->output_list, link) {
+ output_get_new_size(it, &height, &width);
+ }
+ update_screen_size(xwl_output, width, height);
}
static void
--
2.5.0
More information about the xorg-devel
mailing list