From e699edc5c53cf77dec04ceecc1ceb03cb1eb3920 Mon Sep 17 00:00:00 2001 From: Alessandro Iezzi Date: Tue, 30 May 2023 00:45:18 +0200 Subject: Change the logic of cherry_window_set_position --- src/window.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/window.c b/src/window.c index 150d8ef..10f4766 100644 --- a/src/window.c +++ b/src/window.c @@ -151,6 +151,7 @@ cherry_window_set_dimension(CherryWindow *window, int width, int height) } } +void cherry_window_get_position(CherryWindow *window, int *x, int *y) { CherryWidget *widget = (CherryWidget *) window; @@ -158,15 +159,11 @@ cherry_window_get_position(CherryWindow *window, int *x, int *y) } void -cherry_window_set_position(CherryWindow *w, int x, int y) +cherry_window_set_position(CherryWindow *window, int x, int y) { - w->x = x; - w->y = y; + CherryWidget *widget = (CherryWidget *) window; + cherry_widget_set_position(widget, x, 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