Changeset 1e3375b in mainline


Ignore:
Timestamp:
2015-03-10T23:36:53Z (9 years ago)
Author:
Michal Koutný <xm.koutny+hos@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
acb8766e
Parents:
1619faa (diff), 2c7fdaa (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge from mainline

Location:
uspace
Files:
11 edited

Legend:

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

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

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

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

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

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

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

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

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

    r1619faa r1e3375b  
    591591}
    592592
    593 window_t *window_open(const char *winreg, bool is_main, bool is_decorated,
     593window_t *window_open(const char *winreg, window_flags_t flags,
    594594    const char *caption)
    595595{
     
    598598                return NULL;
    599599       
    600         win->is_main = is_main;
    601         win->is_decorated = is_decorated;
     600        win->is_main = flags & WINDOW_MAIN;
     601        win->is_decorated = flags & WINDOW_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, &in_dsid, &out_dsid);
     634        rc = win_register(reg_sess, flags, &in_dsid, &out_dsid);
    635635        async_hangup(reg_sess);
    636636        if (rc != EOK) {
  • uspace/lib/gui/window.h

    r1619faa r1e3375b  
    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 extern window_t *window_open(const char *, bool, bool, const char *);
     67 * whole application. Note that opened window does not have any surface yet.
     68 */
     69extern window_t *window_open(const char *, window_flags_t, const char *);
    6970
    7071/**
  • uspace/srv/hid/compositor/compositor.c

    r1619faa r1e3375b  
    9090        link_t link;
    9191        atomic_t ref_cnt;
     92        window_flags_t flags;
    9293        service_id_t in_dsid;
    9394        service_id_t out_dsid;
     
    635636        sysarg_t pos_id = IPC_GET_ARG1(*icall);
    636637        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);
    637645
    638646        fibril_mutex_lock(&pointer_list_mtx);
     
    903911                                return;
    904912                        }
     913                       
     914                        win->flags = IPC_GET_ARG1(call);
    905915
    906916                        char name_in[LOC_NAME_MAXLEN + 1];
     
    18851895                fibril_mutex_lock(&window_list_mtx);
    18861896                window_t *win = (window_t *) list_first(&window_list);
    1887                 if (win && win->surface) {
     1897                if ((win) && (win->surface) && (win->flags & WINDOW_RESIZEABLE)) {
    18881898                        window_event_t *event = (window_event_t *) malloc(sizeof(window_event_t));
    18891899                        if (event == NULL) {
Note: See TracChangeset for help on using the changeset viewer.