summaryrefslogtreecommitdiff
path: root/src/ui/root.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/root.c')
-rw-r--r--src/ui/root.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ui/root.c b/src/ui/root.c
index 6ea5f521..52a08eca 100644
--- a/src/ui/root.c
+++ b/src/ui/root.c
@@ -383,18 +383,18 @@ static iBool handleRootCommands_(iWidget *root, const char *cmd) {
383 else if (equal_Command(cmd, "window.setrect")) { 383 else if (equal_Command(cmd, "window.setrect")) {
384 const int snap = argLabel_Command(cmd, "snap"); 384 const int snap = argLabel_Command(cmd, "snap");
385 if (snap) { 385 if (snap) {
386 iWindow *window = get_Window(); 386 iMainWindow *window = get_MainWindow();
387 iInt2 coord = coord_Command(cmd); 387 iInt2 coord = coord_Command(cmd);
388 iInt2 size = init_I2(argLabel_Command(cmd, "width"), 388 iInt2 size = init_I2(argLabel_Command(cmd, "width"),
389 argLabel_Command(cmd, "height")); 389 argLabel_Command(cmd, "height"));
390 SDL_SetWindowPosition(window->win, coord.x, coord.y); 390 SDL_SetWindowPosition(window->base.win, coord.x, coord.y);
391 SDL_SetWindowSize(window->win, size.x, size.y); 391 SDL_SetWindowSize(window->base.win, size.x, size.y);
392 window->place.snap = snap; 392 window->place.snap = snap;
393 return iTrue; 393 return iTrue;
394 } 394 }
395 } 395 }
396 else if (equal_Command(cmd, "window.restore")) { 396 else if (equal_Command(cmd, "window.restore")) {
397 setSnap_Window(get_Window(), none_WindowSnap); 397 setSnap_MainWindow(get_MainWindow(), none_WindowSnap);
398 return iTrue; 398 return iTrue;
399 } 399 }
400 else if (equal_Command(cmd, "window.minimize")) { 400 else if (equal_Command(cmd, "window.minimize")) {
@@ -1525,5 +1525,5 @@ iRect safeRect_Root(const iRoot *d) {
1525} 1525}
1526 1526
1527iInt2 visibleSize_Root(const iRoot *d) { 1527iInt2 visibleSize_Root(const iRoot *d) {
1528 return addY_I2(size_Root(d), -get_Window()->keyboardHeight); 1528 return addY_I2(size_Root(d), -get_MainWindow()->keyboardHeight);
1529} 1529}