This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#10868 - Always display backdrop in the plugin's menu
Attached to Project:
Rockbox
Opened by Johannes Schwarz (Ubuntuxer) - Saturday, 19 December 2009, 22:53 GMT+2
Last edited by Jonathan Gordon (jdgordon) - Saturday, 29 May 2010, 16:29 GMT+2
Opened by Johannes Schwarz (Ubuntuxer) - Saturday, 19 December 2009, 22:53 GMT+2
Last edited by Jonathan Gordon (jdgordon) - Saturday, 29 May 2010, 16:29 GMT+2
|
DetailsI wrote a small patch, which display always backdrop in the plugin's menu.
But I have the sense that on the targets the menu is displayed delayed. Please test it and give me feedback. |
This task depends upon
What i think is needed is simple function(s) to just only show/hide backdrop.
I also had thought an idea that backdrop is hidden when the theme is disabled.
but probably cause another problem - backdrop is not shown or shown partly.
What do you mean with theme manager ? (viewport.c: viewportmanager_theme_enable())?
The function "backdrop_show(BACKDROP_MAIN) " shows the backdrop if the backdrop was loaded once.
You can hide the backdrop with function "lcd_set_backdrop(NULL)".
> IMO, loading backdrop from disk when open the menu is the worst way.
You're right, so I rewrote the patch and use the function "lcd_set_backdrop(NULL)".
Now it works fine for me, the menu isn't displayed delayed anymore.
1) its not only plugins are show this problem, the only reason it works in the wps now is because its handled where it shouldnt be
2) plugins arnt core and have a different set of assumptions, this might be bad, but there are how many plugins that all need to be fixed.
As do_menu() is made to have a simple way of creating a list, particularly for plugins, I changed to meaning of hide_bars to hide_theme. So, passing false will show both the SBS and the backdrop and passing true will hide both.
In sbs times, hiding the bars only isn't really appropriate. Turning it to hide_theme keeps it simple, and still allows to override (with a custom viewport and backdorp for example).
This way we can commit it IMO.
changing to hide_theme is the logical way to go, but the backdrop itself is part of the theme NOT the list, therefore the showing/hiding of it needs to happen inside viewportmanager_theme_enable().
Changing it now to happen in viewportmanager_enable() is a bit more work since it's called more often, and I'm not very familiar yet with how viewport.c works today.
I have a cleaner way to do this without manginglg backdrop.c which ill work on this evening if i dont do anything else.
If we go this route, it would make things slightly simpler for skined screens because they would need to manually toggle their backdrop, but as soon as they disable the theme it will revert to the main.
skins don't necessarily disable the theme; the wps enables or disables it depending on %we/%wd.
If a skin does load a backdrop, and then doesnt call theme_undo() before going into any menus, this wont nessecarily show the write thing.
the only background which the theme should be able to set is the "main" one, skins need to manage their own (which will happen without extra work anyway). my plan is to simply load the backdrop into the skin buffer, save a pointer on the wps_data struct, backdrop_show() when the skin needs to do a full refresh (which the screen will manage accordingly, ah la wps_enter_screen() or whatver the heck its called... this will probbaly all happen in 10922