Changes in / [1e3375b:1619faa] in mainline
- Location:
- uspace
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/barber/barber.c
r1e3375b r1619faa 308 308 309 309 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"); 312 311 if (!main_window) { 313 312 printf("Cannot open main window.\n"); -
uspace/app/fontviewer/fontviewer.c
r1e3375b r1619faa 260 260 } 261 261 262 main_window = window_open(argv[1], WINDOW_MAIN, "fontviewer");262 main_window = window_open(argv[1], true, false, "fontviewer"); 263 263 if (!main_window) { 264 264 printf("Cannot open main window.\n"); -
uspace/app/vdemo/vdemo.c
r1e3375b r1619faa 110 110 { 111 111 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"); 114 113 if (!main_window) { 115 114 printf("Cannot open main window.\n"); -
uspace/app/viewer/viewer.c
r1e3375b r1619faa 167 167 } 168 168 169 main_window = window_open(argv[1], WINDOW_MAIN, "viewer");169 main_window = window_open(argv[1], true, false, "viewer"); 170 170 if (!main_window) { 171 171 printf("Cannot open main window.\n"); -
uspace/app/vlaunch/vlaunch.c
r1e3375b r1619faa 114 114 115 115 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"); 118 117 if (!main_window) { 119 118 printf("Cannot open main window.\n"); -
uspace/app/vterm/vterm.c
r1e3375b r1619faa 49 49 } 50 50 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"); 53 52 if (!main_window) { 54 53 printf("%s: Cannot open main window.\n", NAME); -
uspace/lib/c/generic/io/window.c
r1e3375b r1619faa 40 40 #include <stdio.h> 41 41 42 int win_register(async_sess_t *sess, window_flags_t flags, service_id_t *in, 43 service_id_t *out) 42 int win_register(async_sess_t *sess, service_id_t *in, service_id_t *out) 44 43 { 45 44 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); 47 46 async_exchange_end(exch); 48 47 -
uspace/lib/c/include/io/window.h
r1e3375b r1619faa 42 42 #include <io/kbd_event.h> 43 43 #include <io/pos_event.h> 44 45 typedef enum {46 WINDOW_MAIN = 1,47 WINDOW_DECORATED = 2,48 WINDOW_RESIZEABLE = 449 } window_flags_t;50 44 51 45 typedef enum { … … 114 108 } window_event_t; 115 109 116 extern int win_register(async_sess_t *, window_flags_t, service_id_t *, 117 service_id_t *); 110 extern int win_register(async_sess_t *, service_id_t *, service_id_t *); 118 111 119 112 extern int win_get_event(async_sess_t *, window_event_t *); -
uspace/lib/gui/window.c
r1e3375b r1619faa 591 591 } 592 592 593 window_t *window_open(const char *winreg, window_flags_t flags,593 window_t *window_open(const char *winreg, bool is_main, bool is_decorated, 594 594 const char *caption) 595 595 { … … 598 598 return NULL; 599 599 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; 602 602 win->is_focused = true; 603 603 prodcons_initialize(&win->events); … … 632 632 service_id_t in_dsid; 633 633 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); 635 635 async_hangup(reg_sess); 636 636 if (rc != EOK) { -
uspace/lib/gui/window.h
r1e3375b r1619faa 65 65 * Allocate all resources for new window and register it in the compositor. 66 66 * 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. */ 68 extern window_t *window_open(const char *, bool, bool, const char *); 70 69 71 70 /** -
uspace/srv/hid/compositor/compositor.c
r1e3375b r1619faa 90 90 link_t link; 91 91 atomic_t ref_cnt; 92 window_flags_t flags;93 92 service_id_t in_dsid; 94 93 service_id_t out_dsid; … … 636 635 sysarg_t pos_id = IPC_GET_ARG1(*icall); 637 636 sysarg_t grab_flags = IPC_GET_ARG2(*icall); 638 639 /*640 * Filter out resize grab flags if the window641 * is not resizeable.642 */643 if ((win->flags & WINDOW_RESIZEABLE) != WINDOW_RESIZEABLE)644 grab_flags &= ~(GF_RESIZE_X | GF_RESIZE_Y);645 637 646 638 fibril_mutex_lock(&pointer_list_mtx); … … 911 903 return; 912 904 } 913 914 win->flags = IPC_GET_ARG1(call);915 905 916 906 char name_in[LOC_NAME_MAXLEN + 1]; … … 1895 1885 fibril_mutex_lock(&window_list_mtx); 1896 1886 window_t *win = (window_t *) list_first(&window_list); 1897 if ( (win) && (win->surface) && (win->flags & WINDOW_RESIZEABLE)) {1887 if (win && win->surface) { 1898 1888 window_event_t *event = (window_event_t *) malloc(sizeof(window_event_t)); 1899 1889 if (event == NULL) {
Note:
See TracChangeset
for help on using the changeset viewer.