diff options
author | 2023-05-30 00:45:18 +0200 | |
---|---|---|
committer | 2023-05-30 00:45:18 +0200 | |
commit | e699edc5c53cf77dec04ceecc1ceb03cb1eb3920 (patch) | |
tree | b350edc9fd8a1afab67c747db041b91f7694ba5e /src | |
parent | 769cd86117adeb23adc6861d00bd7b2361e503ad (diff) | |
download | cherry-e699edc5c53cf77dec04ceecc1ceb03cb1eb3920.tar.gz cherry-e699edc5c53cf77dec04ceecc1ceb03cb1eb3920.zip |
Change the logic of cherry_window_set_position
Diffstat (limited to 'src')
-rw-r--r-- | src/window.c | 11 |
1 files 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 |