xorg-x11-server/0017-xwayland-Add-xwl_window_create_frame_callback-helper.patch
Olivier Fourdan 1e468bc44a xserver 1.20.7
- backport from stable "xserver-1.20-branch" up to commit ad7364d8d
  (for mutter fullscreen unredirect on Wayland)
- Update videodrv minor ABI as 1.20.7 changed the minor ABI version
  (backward compatible, API addition in glamor)
- Rebase Xwayland randr resolution change emulation support patches
2020-03-13 09:54:18 +01:00

63 lines
2.0 KiB
Diff

From 915cc107767624bd7914c962347bab9c2e21cdff Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <mdaenzer@redhat.com>
Date: Fri, 13 Dec 2019 18:26:35 +0100
Subject: [PATCH xserver 17/22] xwayland: Add xwl_window_create_frame_callback
helper
This will be used by the following changes. No functional change
intended.
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
(cherry picked from commit f80eea0529b2cfb805a9c7d4994a4235451131e3)
---
hw/xwayland/xwayland.c | 12 +++++++++---
hw/xwayland/xwayland.h | 2 ++
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c
index d3a4684d2..ef01842f0 100644
--- a/hw/xwayland/xwayland.c
+++ b/hw/xwayland/xwayland.c
@@ -747,6 +747,14 @@ static const struct wl_callback_listener frame_listener = {
frame_callback
};
+void
+xwl_window_create_frame_callback(struct xwl_window *xwl_window)
+{
+ xwl_window->frame_callback = wl_surface_frame(xwl_window->surface);
+ wl_callback_add_listener(xwl_window->frame_callback, &frame_listener,
+ xwl_window);
+}
+
static Bool
xwl_destroy_window(WindowPtr window)
{
@@ -817,9 +825,7 @@ xwl_window_post_damage(struct xwl_window *xwl_window)
box->x2 - box->x1, box->y2 - box->y1);
}
- xwl_window->frame_callback = wl_surface_frame(xwl_window->surface);
- wl_callback_add_listener(xwl_window->frame_callback, &frame_listener, xwl_window);
-
+ xwl_window_create_frame_callback(xwl_window);
DamageEmpty(window_get_damage(xwl_window->window));
}
diff --git a/hw/xwayland/xwayland.h b/hw/xwayland/xwayland.h
index 0854df456..d20016c5d 100644
--- a/hw/xwayland/xwayland.h
+++ b/hw/xwayland/xwayland.h
@@ -378,6 +378,8 @@ struct xwl_output {
Bool xdg_output_done;
};
+void xwl_window_create_frame_callback(struct xwl_window *xwl_window);
+
void xwl_sync_events (struct xwl_screen *xwl_screen);
Bool xwl_screen_init_cursor(struct xwl_screen *xwl_screen);
--
2.24.1