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