Changes in / [1e3375b:1619faa] in mainline


Ignore:
Location:
uspace
Files:
11 edited

Legend:

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

    r1e3375b r1619faa  
    308308       
    309309        winreg = argv[1];
    310         window_t *main_window = window_open(argv[1],
    311             WINDOW_MAIN | WINDOW_DECORATED, "barber");
     310        window_t *main_window = window_open(argv[1], true, true, "barber");
    312311        if (!main_window) {
    313312                printf("Cannot open main window.\n");
  • uspace/app/fontviewer/fontviewer.c

    r1e3375b r1619faa  
    260260        }
    261261       
    262         main_window = window_open(argv[1], WINDOW_MAIN, "fontviewer");
     262        main_window = window_open(argv[1], true, false, "fontviewer");
    263263        if (!main_window) {
    264264                printf("Cannot open main window.\n");
  • uspace/app/vdemo/vdemo.c

    r1e3375b r1619faa  
    110110{
    111111        if (argc >= 2) {
    112                 window_t *main_window = window_open(argv[1],
    113                     WINDOW_MAIN | WINDOW_DECORATED | WINDOW_RESIZEABLE, "vdemo");
     112                window_t *main_window = window_open(argv[1], true, true, "vdemo");
    114113                if (!main_window) {
    115114                        printf("Cannot open main window.\n");
  • uspace/app/viewer/viewer.c

    r1e3375b r1619faa  
    167167        }
    168168       
    169         main_window = window_open(argv[1], WINDOW_MAIN, "viewer");
     169        main_window = window_open(argv[1], true, false, "viewer");
    170170        if (!main_window) {
    171171                printf("Cannot open main window.\n");
  • uspace/app/vlaunch/vlaunch.c

    r1e3375b r1619faa  
    114114       
    115115        winreg = argv[1];
    116         window_t *main_window = window_open(argv[1],
    117             WINDOW_MAIN | WINDOW_DECORATED | WINDOW_RESIZEABLE, "vlaunch");
     116        window_t *main_window = window_open(argv[1], true, true, "vlaunch");
    118117        if (!main_window) {
    119118                printf("Cannot open main window.\n");
  • uspace/app/vterm/vterm.c

    r1e3375b r1619faa  
    4949        }
    5050       
    51         window_t *main_window = window_open(argv[1],
    52             WINDOW_MAIN | WINDOW_DECORATED, "vterm");
     51        window_t *main_window = window_open(argv[1], true, true, "vterm");
    5352        if (!main_window) {
    5453                printf("%s: Cannot open main window.\n", NAME);
  • uspace/lib/c/generic/io/window.c

    r1e3375b r1619faa  
    4040#include <stdio.h>
    4141
    42 int win_register(async_sess_t *sess, window_flags_t flags, service_id_t *in,
    43     service_id_t *out)
     42int win_register(async_sess_t *sess, service_id_t *in, service_id_t *out)
    4443{
    4544        async_exch_t *exch = async_exchange_begin(sess);
    46         int ret = async_req_1_2(exch, WINDOW_REGISTER, flags, in, out);
     45        int ret = async_req_0_2(exch, WINDOW_REGISTER, in, out);
    4746        async_exchange_end(exch);
    4847       
  • uspace/lib/c/include/io/window.h

    r1e3375b r1619faa  
    4242#include <io/kbd_event.h>
    4343#include <io/pos_event.h>
    44 
    45 typedef enum {
    46         WINDOW_MAIN = 1,
    47         WINDOW_DECORATED = 2,
    48         WINDOW_RESIZEABLE = 4
    49 } window_flags_t;
    5044
    5145typedef enum {
     
    114108} window_event_t;
    115109
    116 extern int win_register(async_sess_t *, window_flags_t, service_id_t *,
    117     service_id_t *);
     110extern int win_register(async_sess_t *, service_id_t *, service_id_t *);
    118111
    119112extern int win_get_event(async_sess_t *, window_event_t *);
  • uspace/lib/gui/window.c

    r1e3375b r1619faa  
    591591}
    592592
    593 window_t *window_open(const char *winreg, window_flags_t flags,
     593window_t *window_open(const char *winreg, bool is_main, bool is_decorated,
    594594    const char *caption)
    595595{
     
    598598                return NULL;
    599599       
    600         win->is_main = flags & WINDOW_MAIN;
    601         win->is_decorated = flags & WINDOW_DECORATED;
     600        win->is_main = is_main;
     601        win->is_decorated = is_decorated;
    602602        win->is_focused = true;
    603603        prodcons_initialize(&win->events);
     
    632632        service_id_t in_dsid;
    633633        service_id_t out_dsid;
    634         rc = win_register(reg_sess, flags, &in_dsid, &out_dsid);
     634        rc = win_register(reg_sess, &in_dsid, &out_dsid);
    635635        async_hangup(reg_sess);
    636636        if (rc != EOK) {
  • uspace/lib/gui/window.h

    r1e3375b r1619faa  
    6565 * Allocate all resources for new window and register it in the compositor.
    6666 * If the window is declared as main, its closure causes termination of the
    67  * whole application. Note that opened window does not have any surface yet.
    68  */
    69 extern window_t *window_open(const char *, window_flags_t, const char *);
     67 * whole application. Note that opened window does not have any surface yet. */
     68extern window_t *window_open(const char *, bool, bool, const char *);
    7069
    7170/**
  • uspace/srv/hid/compositor/compositor.c

    r1e3375b r1619faa  
    9090        link_t link;
    9191        atomic_t ref_cnt;
    92         window_flags_t flags;
    9392        service_id_t in_dsid;
    9493        service_id_t out_dsid;
     
    636635        sysarg_t pos_id = IPC_GET_ARG1(*icall);
    637636        sysarg_t grab_flags = IPC_GET_ARG2(*icall);
    638        
    639         /*
    640          * Filter out resize grab flags if the window
    641          * is not resizeable.
    642          */
    643         if ((win->flags & WINDOW_RESIZEABLE) != WINDOW_RESIZEABLE)
    644                 grab_flags &= ~(GF_RESIZE_X | GF_RESIZE_Y);
    645637
    646638        fibril_mutex_lock(&pointer_list_mtx);
     
    911903                                return;
    912904                        }
    913                        
    914                         win->flags = IPC_GET_ARG1(call);
    915905
    916906                        char name_in[LOC_NAME_MAXLEN + 1];
     
    18951885                fibril_mutex_lock(&window_list_mtx);
    18961886                window_t *win = (window_t *) list_first(&window_list);
    1897                 if ((win) && (win->surface) && (win->flags & WINDOW_RESIZEABLE)) {
     1887                if (win && win->surface) {
    18981888                        window_event_t *event = (window_event_t *) malloc(sizeof(window_event_t));
    18991889                        if (event == NULL) {
Note: See TracChangeset for help on using the changeset viewer.