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

Fix issues in wlr/taskbar #969

Merged
merged 2 commits into from
Jan 11, 2021
Merged

Conversation

alebastr
Copy link
Contributor

@alebastr alebastr commented Jan 9, 2021

See commit descriptions for individual issues.

A better fix for the protocol error would be to separate the foreign toplevel manager code from Gtk UI and keep a single instance shared between bars, but that requires more time and effort than I can spare right now ☹️

CC: @danieldg, @l3nkz

wl_array->size contains the number of bytes in the array instead of the
number of elements.
Destroy request is not specified for foreign toplevel manager and it
does not prevent the compositor from sending more events.
Libwayland would ignore events to a destroyed objects, but that could
indirectly cause a gap in the sequence of new object ids and trigger
error condition in the library.

With this commit waybar sends a `stop` request to notify the compositor
about the destruction of a toplevel manager. That fixes abnormal
termination of the bar with following errors:
```
(waybar:11791): Gdk-DEBUG: 20:04:19.778: not a valid new object id (4278190088), message toplevel(n)

Gdk-Message: 20:04:19.778: Error reading events from display: Invalid argument
```
@l3nkz
Copy link
Contributor

l3nkz commented Jan 11, 2021

Thank you very much for your fixes. All looks good to me.
I will think about your idea to separate the foreign toplevel manager handling code from the ui stuff. And might submit a PR for that. Thanks for the input.

@Alexays
Copy link
Owner

Alexays commented Jan 11, 2021

LGTM

@Alexays Alexays merged commit 29cba22 into Alexays:master Jan 11, 2021
@alebastr alebastr deleted the wlr-taskbar-fixes branch January 11, 2021 16:44
@l3nkz
Copy link
Contributor

l3nkz commented Jan 13, 2021

Hm, I get now some very wired behavior when unplugging from an external output. Sometimes my compositor (wayfire) crashes now which is even worse than waybar crashing. But I first need to look into this more closely.

@alebastr
Copy link
Contributor Author

@l3nkz do you have a wayfire backtrace?
The only change from the compositor standpoint is that the wlr-foreign-toplevel-manager serverside object is now deleted on output unplug. That doesn't seem to be causing any issues on sway.

@l3nkz
Copy link
Contributor

l3nkz commented Jan 14, 2021

@alebastr I am working on it. However, I couldn't yet reproduce it when I start wayfire directly from console instead of starting it via SDDM. I will continue digging into the problem. Maybe this is unrelated with this change. I will keep you updated.

@l3nkz
Copy link
Contributor

l3nkz commented Jan 20, 2021

After some more digging, I think this is actually unrelated to your change. Thank you again for your work.

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

Successfully merging this pull request may close these issues.

None yet

3 participants