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

    rba02baa r62fbb7e  
    166166        }
    167167       
    168         main_window = window_open(argv[1], true, false, "viewer", 0, 0);
     168        main_window = window_open(argv[1], true, false, "viewer");
    169169        if (!main_window) {
    170170                printf("Cannot open main window.\n");
     
    192192        }
    193193       
    194         window_resize(main_window, WINDOW_WIDTH, WINDOW_HEIGHT);
     194        window_resize(main_window, 0, 0, WINDOW_WIDTH, WINDOW_HEIGHT,
     195            WINDOW_PLACEMENT_ABSOLUTE);
    195196        window_exec(main_window);
    196197       
Note: See TracChangeset for help on using the changeset viewer.