In theory, this might decrease usage a little.
However, is the reduction of resource usage visible to the users?
If this makes the program even harder to maintain, this isn't worth the effort.
In addition, using customized widgets means we lose accessibility support provided by standard gtk+ widgets. We already have this problems in the launch bar plugin and it's hard to fix.
If you have 10 windows opened, there will be 10 GtkToggledButton in the taskbar. Ten instances of GtkToggledButton actually cost several kilobytes only. The most resource they used in the button is for the icon, which is a bitmap. Creating a custom taskbar won't save any resource from this part. You still need the icons anyways.
So, I guess this might not make that much differences. It's just my guess and it's not base on profiling or benchmark. However, if you have the time and ability, I'd suggest that you devote your time to fix other parts to make it better. This should be more cost-effective.
Cheers! :-)

On Tue, Sep 13, 2011 at 8:11 AM, Rouslan Korneychuk <> wrote:

I noticed that the taskbar plugin creates a GtkToggleButton for every task. Since every button has the same geometry, is spaced uniformly and only one can be acted upon at a time, this seems redundant (especially considering that each button is actually a container for more widgets).

Would the LXDE community be interested if I implemented a version that uses a single widget (not counting the pop-up menus and tool-tips) that manually draws all the buttons. I already made a little demo to gauge how difficult it would be (not very). It would look and act exactly the same as the current taskbar (including proper tool-tips, raising a window with drag-and-drop and focus support for when lxpanel is made keyboard navigable), except icons will be drawn with half opacity for minimized windows and will be clipped inside the button instead of spilling out to the right when the buttons are too short to encompass the icon (from e.g. having too many windows open), and to activate a button, it will have to be pressed and then released while the cursor is still over the button, like everywhere else. I have been using the source code for GtkButton as a guide to make sure the buttons will look right regardless of widget theme.

One internal change will be that the list of open windows will managed by a single object shared between each taskbar instance (which is especially useful with my recent multi-monitor patch).

The only issue I foresee is support for older versions of GTK and related libraries. Either someone else will have to update the code for that or someone will have to offer me a little guidance on it.

BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
Learn about the latest advances in developing for the
BlackBerry&reg; mobile platform with sessions, labs & more.
See new tools and technologies. Register for BlackBerry&reg; DevCon today!
Lxde-list mailing list