Created attachment 305663 [details, diff] Patch for lxde-base/lxpanel-0.5.8-r2 to fix the problem. Problem: When configuring lxpanel with dynamic width and autohide enabled, it will become 1-pixel-wide. It seems like the bug was reported upstream but has not been fixed yet: http://sourceforge.net/tracker/?func=detail&aid=3206797&group_id=180858&atid=894869 Steps to reproduce: 1. Install =lxde-base/lxpanel-0.5.8 (or any other version). 2. Start up lxpanel. 3. Open up setting dialog of main panel (right click on the panel and choose "Panel Settings"). 4. At the Geometry tab, configure it to have dynamic width (the pull-down menu on the right side of the width spinbox). 5. At the Advanced tab, configure it to be auto-hiding (tick "Minimize panel when not in use"). 6. Restart lxpanel. 7. The 1-pixel mini panel appears. Actual result: The panel will have 1 pixel width most of the time. It resizes to normal width occasionally. Expected result: The panel should allocate proper minimum size, instead of resizing to 1-pixel. How often: Almost always reproducible. Fix: I've attached a workaround patch based on lxde-base/lxpanel-0.5.8-r2. It works and resizes correctly so far. However, I think it needs more testing. This patch attempts to fix the following 2 problems. I'll describe my guess as detailed as I can, so people can help me judge whether they are good solutions or not. 1. When dyanmic width and autohide are enabled, the panel got resized to 1 pixel. My guess is that, the GTK size-request event was incorrectly used. I'm not sure about this one, though, but what I did was adding gtk_widget_set_size_request() function call to size-request callback. lxpanel originally tries to set the "GtkRequisition *req" argument of the size-request callback. This fixes the fundamental problem. The panel is no longer 1-pixel-wide when in visible state. 2. The panel in hidden state is still 1-pixel-wide. lxpanel calls gtk_widget_hide() to hide panel contents when hiding panel. My guess is that, the hidden container box occupies no space, which makes size-request to always report 0 pixel, causing the whole panel to become 1-pixel-wide when hidden. The method I used to fix this problem is to ask the "content box" for panel size, instead of the container of the content box (the panel). I'll report this possible solution to upstream later, probably by linking back here.
Thanks for taking this bug upstream. We'll keep an eye on how upstream will handle this bug and apply the patch as appropriate
This should be fixed in -r3 which is now masked. Please test and report back here. Thanks a lot
Installed lxde-base/lxpanel-0.5.8-r3 yesterday. So far, it works fine with my configuration (one dynamic auto-hide panel as system tray). I'll comment on this bug again if I find any critical issue. Thank you.
I intend to send a pull-request upstream with a slightly modified (but essentially the same) version of your patch. Please check if it is ok here: https://github.com/hsgg/lxpanel/commit/e3e6be2ca32f7bc13e24b8e66c8667c078cb342b Thanks.
(In reply to comment #4) > I intend to send a pull-request upstream with a slightly modified (but > essentially the same) version of your patch. Please check if it is ok here: > > https://github.com/hsgg/lxpanel/commit/ > e3e6be2ca32f7bc13e24b8e66c8667c078cb342b > > Thanks. Your patch looks fine and works here. Actually I think your patch looks tidier and therefore is the better one.
Ok, it is upstream now: http://lxde.git.sourceforge.net/git/gitweb.cgi?p=lxde/lxpanel;a=commit;h=b957082c1aa8c2da2827f7be964a8ef731026243
I guess we need (yet) another revision here
(In reply to comment #7) > I guess we need (yet) another revision here Nah, the patches are similar enough... But as you wish, of course...
Ok I see no reason to create a new revision then. We can keep using the existing one until a new lxpanel is out. Thanks a lot for the patch and the testing!