Changeset 5d9403d5 in mainline for uspace/app/taskbar/tbsmenu.c
- Timestamp:
- 2023-10-13T20:27:14Z (15 months ago)
- Branches:
- master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7aa9fa1b
- Parents:
- 788c76e3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/taskbar/tbsmenu.c
r788c76e3 r5d9403d5 92 92 (void *)tbsmenu); 93 93 94 ui_pbutton_set_default(tbsmenu->sbutton, true); 95 94 96 rc = ui_fixed_add(fixed, ui_pbutton_ctl(tbsmenu->sbutton)); 95 97 if (rc != EOK) … … 166 168 tbsmenu->rect = *rect; 167 169 ui_pbutton_set_rect(tbsmenu->sbutton, rect); 170 } 171 172 /** Open taskbar start menu. 173 * 174 * @param tbsmenu Start menu 175 */ 176 void tbsmenu_open(tbsmenu_t *tbsmenu) 177 { 178 (void) ui_menu_open(tbsmenu->smenu, &tbsmenu->rect, 179 tbsmenu->ev_idev_id); 180 } 181 182 /** Close taskbar start menu. 183 * 184 * @param tbsmenu Start menu 185 */ 186 void tbsmenu_close(tbsmenu_t *tbsmenu) 187 { 188 ui_menu_close(tbsmenu->smenu); 189 } 190 191 /** Determine if taskbar start menu is open. 192 * 193 * @param tbsmenu Start menu 194 * @return @c true iff start menu is open 195 */ 196 bool tbsmenu_is_open(tbsmenu_t *tbsmenu) 197 { 198 return ui_menu_is_open(tbsmenu->smenu); 168 199 } 169 200 … … 352 383 tbsmenu_t *tbsmenu = (tbsmenu_t *)arg; 353 384 354 if (!ui_menu_is_open(tbsmenu->smenu)) { 355 // XXX ev_pos_id is not set!!! 356 (void) ui_menu_open(tbsmenu->smenu, &tbsmenu->rect, 357 tbsmenu->ev_pos_id); 385 if (!tbsmenu_is_open(tbsmenu)) { 386 tbsmenu_open(tbsmenu); 358 387 } else { 359 388 /* menu is open */ 360 ui_menu_close(tbsmenu->smenu);389 tbsmenu_close(tbsmenu); 361 390 } 362 391 }
Note:
See TracChangeset
for help on using the changeset viewer.