Changeset 62fbb7e in mainline for uspace/app/vlaunch/vlaunch.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/vlaunch/vlaunch.c

    rba02baa r62fbb7e  
    115115       
    116116        winreg = argv[1];
    117         window_t *main_window = window_open(argv[1], true, true, "vlaunch", 0, 0);
     117        window_t *main_window = window_open(argv[1], true, true, "vlaunch");
    118118        if (!main_window) {
    119119                printf("Cannot open main window.\n");
     
    159159        grid->add(grid, &btn_vlaunch->widget, 0, 4, 1, 1);
    160160       
    161         window_resize(main_window, 210, 130 + LOGO_HEIGHT);
     161        window_resize(main_window, 0, 0, 210, 130 + LOGO_HEIGHT,
     162            WINDOW_PLACEMENT_RIGHT | WINDOW_PLACEMENT_TOP);
    162163        window_exec(main_window);
    163164       
Note: See TracChangeset for help on using the changeset viewer.