Changeset 62fbb7e in mainline for uspace/app/vterm/vterm.c


Ignore:
Timestamp:
2014-01-16T20:43:22Z (10 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6a3d0c7
Parents:
ba02baa
Message:

refactor window placement logic and introduce logical window placement flags

  • The original setup of window position during creation (window_open()) was quite useless, because the window had no surface yet.
  • Now the window position can be optinally set using window_resize() and various logical placement flags are available.
  • A separate window_move() routine could be introduced eventually if needed, but for the initial setup of the window the combination of window position and size works fine.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/vterm/vterm.c

    rba02baa r62fbb7e  
    4949        }
    5050       
    51         window_t *main_window = window_open(argv[1], true, true, "vterm", 0, 0);
     51        window_t *main_window = window_open(argv[1], true, true, "vterm");
    5252        if (!main_window) {
    5353                printf("%s: Cannot open main window.\n", NAME);
     
    5555        }
    5656       
    57         window_resize(main_window, 648, 510);
     57        window_resize(main_window, 0, 0, 648, 510, WINDOW_PLACEMENT_ANY);
    5858        terminal_t *terminal_widget =
    5959            create_terminal(window_root(main_window), 640, 480);
Note: See TracChangeset for help on using the changeset viewer.