Changes in uspace/lib/ui/src/window.c [ec50d65e:0d00e53] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ui/src/window.c
rec50d65e r0d00e53 189 189 switch (params->placement) { 190 190 case ui_wnd_place_default: 191 assert(ui_is_fullscreen(window->ui)); 191 case ui_wnd_place_center: 192 assert(params->placement != ui_wnd_place_default || 193 ui_is_fullscreen(window->ui)); 192 194 /* Center window */ 193 195 gfx_rect_dims(¶ms->rect, &dims); … … 343 345 dparams.rect = params->rect; 344 346 dparams.caption = params->caption; 345 /* Only allow making the window larger */ 346 gfx_rect_dims(¶ms->rect, &dparams.min_size); 347 dparams.min_size = params->min_size; 347 348 348 349 /* … … 358 359 if ((params->flags & ui_wndf_popup) != 0) 359 360 dparams.flags |= wndf_popup; 361 if ((params->flags & ui_wndf_nofocus) != 0) 362 dparams.flags |= wndf_nofocus; 360 363 if ((params->flags & ui_wndf_topmost) != 0) 361 364 dparams.flags |= wndf_topmost; … … 1047 1050 ui_lock(ui); 1048 1051 (void) ui_window_resize(window, rect); 1049 (void) ui_window_paint(window);1052 ui_window_send_resize(window); 1050 1053 ui_unlock(ui); 1051 1054 } … … 1295 1298 void ui_window_send_minimize(ui_window_t *window) 1296 1299 { 1297 if (window->cb != NULL && window->cb->m aximize != NULL)1300 if (window->cb != NULL && window->cb->minimize != NULL) 1298 1301 window->cb->minimize(window, window->arg); 1299 1302 else … … 1393 1396 else 1394 1397 return ui_window_def_unfocus(window, nfocus); 1398 } 1399 1400 /** Send window resize event. 1401 * 1402 * @param window Window 1403 */ 1404 void ui_window_send_resize(ui_window_t *window) 1405 { 1406 if (window->cb != NULL && window->cb->resize != NULL) 1407 window->cb->resize(window, window->arg); 1408 else 1409 return ui_window_def_resize(window); 1395 1410 } 1396 1411 … … 1573 1588 if (window->control != NULL) 1574 1589 ui_control_unfocus(window->control, nfocus); 1590 } 1591 1592 /** Default window resize routine. 1593 * 1594 * @param window Window 1595 * @return EOK on success or an error code 1596 */ 1597 void ui_window_def_resize(ui_window_t *window) 1598 { 1599 ui_window_paint(window); 1575 1600 } 1576 1601
Note:
See TracChangeset
for help on using the changeset viewer.