Changeset 06176e1 in mainline for uspace/srv/hid/display/window.c
- Timestamp:
- 2022-12-20T12:31:44Z (17 months ago)
- Branches:
- master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4e7b0ad
- Parents:
- d46ac73
- git-author:
- Jiri Svoboda <jiri@…> (2022-12-19 18:31:30)
- git-committer:
- Jiri Svoboda <jiri@…> (2022-12-20 12:31:44)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/display/window.c
rd46ac73 r06176e1 220 220 } 221 221 222 /** Determine if window is visible. 223 * 224 * @param wnd Window 225 * @return @c true iff window is visible 226 */ 227 bool ds_window_is_visible(ds_window_t *wnd) 228 { 229 return (wnd->flags & wndf_minimized) == 0; 230 } 231 222 232 /** Paint a window using its backing bitmap. 223 233 * … … 233 243 234 244 log_msg(LOG_DEFAULT, LVL_DEBUG2, "ds_window_paint"); 245 246 /* Skip painting the window if not visible */ 247 if (!ds_window_is_visible(wnd)) 248 return EOK; 235 249 236 250 if (rect != NULL) { … … 808 822 } 809 823 824 /** Minimize window. 825 * 826 * @param wnd Window 827 * @return EOK on success or an error code 828 */ 829 errno_t ds_window_minimize(ds_window_t *wnd) 830 { 831 /* If already minimized, do nothing and return success. */ 832 if ((wnd->flags & wndf_minimized) != 0) 833 return EOK; 834 835 wnd->flags |= wndf_minimized; 836 (void) ds_display_paint(wnd->display, NULL); 837 return EOK; 838 } 839 840 /** Unminimize window. 841 * 842 * @param wnd Window 843 * @return EOK on success or an error code 844 */ 845 errno_t ds_window_unminimize(ds_window_t *wnd) 846 { 847 /* If not minimized, do nothing and return success. */ 848 if ((wnd->flags & wndf_minimized) == 0) 849 return EOK; 850 851 wnd->flags &= ~wndf_minimized; 852 (void) ds_display_paint(wnd->display, NULL); 853 return EOK; 854 } 855 810 856 /** Maximize window. 811 857 *
Note:
See TracChangeset
for help on using the changeset viewer.