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

Updated sway-hide work to the latest master #1241

Closed
wants to merge 36 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
013bfb9
Add suppport for displaying Waybar as an overlay layer
nyyManni Oct 30, 2019
0840184
Add module sway/hide for swaybar integration
nyyManni Oct 30, 2019
0e32cff
Use layer shell version 2
somini Sep 21, 2020
4ecb22b
(does not build) try to use barconfig_update
xPMo Jan 2, 2020
4ec1718
fix: thanks nyyManni
xPMo Jan 2, 2020
551973a
Define bar setVisible method
somini Sep 21, 2020
2253f3e
Include mutext on Hide::onEvent
somini Sep 21, 2020
f1cd85f
Improve debug logs
somini Sep 21, 2020
af0b182
Remove support for "overlay" layer
somini Sep 21, 2020
d427a5b
Hide the bar on creation, in "hide" mode
somini Sep 21, 2020
3b15645
Use logging module
somini Sep 21, 2020
979a478
Don't auto-hide the bar on start
somini Sep 21, 2020
92fb316
Merge remote-tracking branch 'alexays/master' into HEAD
emirror-de Sep 12, 2021
e2590fc
Removed unnecessary functions and methods.
emirror-de Sep 12, 2021
13fbf81
Bugfix, set_opacity statements lead to address boundary SIGSEGV.
emirror-de Sep 12, 2021
1c7133c
Updated layer settings.
emirror-de Sep 12, 2021
564e231
Exclusive zone is now removed on intialization of the hide module.
emirror-de Sep 12, 2021
2e28531
sway/hide: Enable exclusive zone on {"mode":"dock"}
xPMo Sep 13, 2021
208351c
sway/hide: Print at debug level when receiving visible_by_modifier
xPMo Sep 13, 2021
24a8e85
Reset unnecessary change of function declaration.
emirror-de Sep 14, 2021
11337dc
Fixed wl_surface_commit call.
emirror-de Sep 14, 2021
00ca332
Merge remote-tracking branch 'xPMo/sway-hide' into sway-hide-updated
emirror-de Sep 14, 2021
0aecb78
Restored implementation of setVisible (to master branch state).
emirror-de Sep 14, 2021
6c3b7e4
Replaced enable-/removeExclusiveZone by setExclusive.
emirror-de Sep 14, 2021
c11aecd
Modifier key now sends the bar to TOP or BOTTOM layer, hidden class g…
emirror-de Sep 14, 2021
73de008
The sway/hide module is now limited to the bar passed by the construc…
emirror-de Sep 15, 2021
09da1f0
The mode value is now overridden to "hide" on construction of modules…
emirror-de Sep 20, 2021
8549996
Merge branch 'Alexays:master' into sway-hide-updated
emirror-de Oct 21, 2021
55ff12a
Changed how mutex is locked.
emirror-de Oct 26, 2021
e276e61
Merge branch 'sway-hide-updated' of github.com:emirror-de/Waybar into…
emirror-de Oct 26, 2021
c502e25
Merge branch 'master' into sway-hide-updated
emirror-de Oct 26, 2021
cf2312f
Added config parameter to hide the bar on startup.
emirror-de Oct 27, 2021
48f1a8f
Merge branch 'master' into sway-hide-updated
emirror-de Oct 30, 2021
d9de7c4
Refactoring sway/hide module, added hide-to-bottom-layer option
emirror-de Nov 3, 2021
0cee530
Config option hide-to-bottom-layer is now queried separately
emirror-de Nov 3, 2021
3e21eb8
Replaced worker method by a call to ipc_.setWorker.
emirror-de Nov 9, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions src/bar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -594,15 +594,10 @@ auto waybar::Bar::setVisible(bool nvis) -> void {
visible = nvis;
if (!visible) {
window.get_style_context()->add_class("hidden");
window.set_opacity(0);
} else {
window.get_style_context()->remove_class("hidden");
window.set_opacity(1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are fixing the symptom and also breaking existing features (show/hide by signal).

set_opacity should not fail on a correct visible Gtk window. The only cases of crash I can imagine without looking at the backtrace are when the window is not yet initialized or already destroyed.
Can you try checking window.get_realized() or window.get_mapped() right after setting the visible property?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry by introducing breaking changes, that was not my intention. I will reset it to the current master branch implementation.

Copy link
Author

@emirror-de emirror-de Sep 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reset the changes to the setVisible function. Calling get_realized or get_mapped did not make a difference.

The following error occurs when set_opacity is in the function and is used when the modifier key is pressed.

fish: “./build/waybar” terminated by signal SIGSEGV (Address boundary error)

In my configuration, I have a transition on the opacity property. Could it be possible that this conflicts to each other?

}
setExclusiveZone(width_, height_);
if (!use_gls_) {
wl_surface_commit(surface);
}
wl_surface_commit(surface);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extraneous wl_surface_commit is known to be able to crash Gtk in certain cases (as found and fixed in gtk-layer-shell). Also, surface can be unset you call that on an unmapped window.
That's why the code in master branch is calling surface_impl_->commit() which is noop for the most cases.

}

auto waybar::Bar::toggle() -> void {
Expand Down