From 02ebb73b60049ccd16bea383e7073403b9f35d6a Mon Sep 17 00:00:00 2001 From: Alessandro Iezzi Date: Wed, 17 May 2023 12:19:04 +0200 Subject: Add logic to resize and move the CherryWindow --- src/window.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/window.c') diff --git a/src/window.c b/src/window.c index fb0ae90..b7cbe14 100644 --- a/src/window.c +++ b/src/window.c @@ -79,6 +79,11 @@ cherry_window_set_dimension(CherryWindow *w, int width, int height) { w->dimension->width = width; w->dimension->height = height; + + CherryApplication *app = cherry_application_get_running_app(); + XMoveResizeWindow(app->display, w->window_handler, + w->x, w->y, + w->dimension->width, w->dimension->height); } void @@ -86,6 +91,11 @@ cherry_window_set_position(CherryWindow *w, int x, int y) { w->x = x; w->y = y; + + CherryApplication *app = cherry_application_get_running_app(); + XMoveResizeWindow(app->display, w->window_handler, + w->x, w->y, + w->dimension->width, w->dimension->height); } void -- cgit v1.2.3