xwayland: Restore the ResizeWindow handler

For now it just chains to ResizeWindow hook.

This is preparation work for the next commit, no functional change.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1521>
This commit is contained in:
Olivier Fourdan 2024-05-06 11:37:36 +02:00 committed by Marge Bot
parent 7745fde24e
commit 539859bde0
4 changed files with 25 additions and 0 deletions

View File

@ -1145,6 +1145,9 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv)
xwl_screen->ConfigNotify = pScreen->ConfigNotify;
pScreen->ConfigNotify = xwl_config_notify;
xwl_screen->ResizeWindow = pScreen->ResizeWindow;
pScreen->ResizeWindow = xwl_resize_window;
xwl_screen->MoveWindow = pScreen->MoveWindow;
pScreen->MoveWindow = xwl_move_window;

View File

@ -78,6 +78,7 @@ struct xwl_screen {
XYToWindowProcPtr XYToWindow;
SetWindowPixmapProcPtr SetWindowPixmap;
ChangeWindowAttributesProcPtr ChangeWindowAttributes;
ResizeWindowProcPtr ResizeWindow;
MoveWindowProcPtr MoveWindow;
SourceValidateProcPtr SourceValidate;
SetShapeProcPtr SetShape;

View File

@ -1830,6 +1830,23 @@ xwl_config_notify(WindowPtr window,
return ret;
}
void
xwl_resize_window(WindowPtr window,
int x, int y,
unsigned int width, unsigned int height,
WindowPtr sib)
{
ScreenPtr screen = window->drawable.pScreen;
struct xwl_screen *xwl_screen;
xwl_screen = xwl_screen_get(screen);
screen->ResizeWindow = xwl_screen->ResizeWindow;
screen->ResizeWindow(window, x, y, width, height, sib);
xwl_screen->ResizeWindow = screen->ResizeWindow;
screen->ResizeWindow = xwl_resize_window;
}
void
xwl_move_window(WindowPtr window,
int x, int y,

View File

@ -135,6 +135,10 @@ int xwl_config_notify(WindowPtr window,
int x, int y,
int width, int height, int bw,
WindowPtr sib);
void xwl_resize_window(WindowPtr window,
int x, int y,
unsigned int width, unsigned int height,
WindowPtr sib);
void xwl_move_window(WindowPtr window,
int x, int y,
WindowPtr next_sib,