Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task items disappear when tasklist overflows #10

Closed
M4he opened this issue Oct 22, 2017 · 2 comments
Closed

Task items disappear when tasklist overflows #10

M4he opened this issue Oct 22, 2017 · 2 comments

Comments

@M4he
Copy link
Contributor

M4he commented Oct 22, 2017

Issue

On a smaller screen, the tasklist may overflow if many applications are opened in the same tag. If more task widgets are added than the center layout allows in terms of width (i.e. the tasklist overflows), the tasklist disappears from the panel wibox completely (visually). Even if the the amount of task items is reduced by closing applications or changing the tag, it won't reappear. It only reappears again when Awesome is restarted. This can be reproduced infinitely on my setup.

Reproduction

  1. load the rc-colorless setup
  2. keep starting different applications until the tasklist fills up completely (= there is no free space at the left and right side of the tasklist)
  3. start even more applications

Expected outcome

  • the task widgets are squished together horizontally (reducing their width), so that all fit in the tasklist together

Actual outcome

  • the task widgets (and effectively the whole tasklist) visually disappear completely from the panel until Awesome is restarted

Debugging

After trying to pin down the issue for a few hours, I've reached the conclusion that it the layout trick to center the tasklist widget may be the culprit. From my humble debugging attempts, I can conclude the following:

  • the amount of task objects in the tasklist widget is still correctly updated
    • when the amount of applications changes (e.g. tag switch), the amount of task objects added to the layout container is correct
    • thus, the task widgets themselves still exist after the issue occurs
  • after the widgets visually disappear from the screen, their fit and draw functions are not called anymore
  • when I replace the expand property or the layout entirely, the issue is fixed but the tasklist is obviously not centered anymore

Which is why my best guess is that it's an issue with the wibox.layout.align.horizontal layout.

Potential fix

The only reliable way I managed to find to fix this while still keeping the tasklist centered, is to change the layout to flex.horizontal and wrap the tasklist into a wibox.container.place, like this:

{ -- middle widget
	layout = wibox.layout.flex.horizontal,
	wibox.container.place(env.wrapper(tasklist[s], "tasklist")),
},

However, the wibox.container.place was just added to Awesome v4.2, so it breaks compatibility with v4.0 and v4.1 sadly.
Maybe there is some other way to get the tasklist centered using containers/layouts from v4.0, but I'm still rather new to the whole framework so I can't come up with anything else currently.

Setup

  • Debian 9.2 (stretch) x64
  • Awesome WM v4.2 (issue also happened on v4.0)
  • rc-colorless config of your repo
worron added a commit to worron/redflat that referenced this issue Oct 22, 2017
@worron
Copy link
Owner

worron commented Oct 22, 2017

Thanks for such detailed report, amazing work.

To be honest I can't see the root of problem but just added some tricky code to make wibox.layout.align work right. Seem like it fixed now, you can test and report.

By the way, editing theme file you can correct widget sizes for better fit in different screen size.

@M4he
Copy link
Contributor Author

M4he commented Oct 23, 2017

Thank you for looking into this so quickly! I tested your fix, seems to work just as fine on my setup.
Good job finding this solution, much appreciated!

@M4he M4he closed this as completed Oct 23, 2017
TanvirOnGH pushed a commit to TanvirOnGH/flex that referenced this issue Sep 12, 2024
TanvirOnGH pushed a commit to TanvirOnGH/flex that referenced this issue Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants