fthx / babar

Task bar. GNOME Shell extension
GNU General Public License v3.0
41 stars 14 forks source link

Toggle of "Always on visible Workspace" only reflected on additional action #32

Closed sluedecke closed 3 years ago

sluedecke commented 3 years ago

I found a 'minor' glicht in the UI behaviour:

Reproduce:

Expected:

Observed:

fthx commented 3 years ago

Ok thanks, I can reproduce. I never use this function, so I did miss that bug.

I'll have a look at what signal is necessary. I don't know if I can succeed, though, because I use global signals, not per-window ones.

fthx commented 3 years ago

https://github.com/fthx/babar/commit/107d0e6399e161e35a6101d160a650e0e4276729

Feel free to reopen if it's not working for you.

fthx commented 3 years ago

It's online now in GNOME Extensions website. Was damn fast, thanks reviewer.

sluedecke commented 3 years ago

Wow, that was real quick!

But: it's not working for me. I log into my desktop with no tasks started. Then I start a single task (Extensions), right click the title bar and select visibility on all workspaces.

Babar is not updated directly, only after I switch workspaces or when I start an additional task.

fthx commented 3 years ago

I see. I just have tested this again and it's 100 % working on Ubuntu 20.04 (GS 3.36) but not on my Fedora 34 VM (GS 40).

fthx commented 3 years ago

Well, I've got a solution: this._windows_changed = this.window_tracker.connect('tracked-windows-changed', this._update_ws.bind(this)); as a new signal.

Buuuut: it redraws much more times the task bar. So I have to investigate.

fthx commented 3 years ago

in GS 3.36 current code is working only in your case. If there are some other apps open, task bar is not updated! Quite odd.

sluedecke commented 3 years ago

It is. Thanks a lot for looking into it.

I am using Arch Linux with Gnome 40 btw.

fthx commented 3 years ago

Ok. I really made a redraw counter and the new signal does not really change the redraws count. So let's go: https://github.com/fthx/babar/commit/14a26369f232336391651203b4b68355c672b1c1

I tried to not redraw the task bar too often, but it causes some glitches, as GS objects sometimes need some time to be raised or available... It remains ok, that's a few redraws (only one for focus change e.g., max. 8 for any action, like launching an app).

Feel free to reopen if... ;-)

fthx commented 3 years ago

Please test this code. If it's ok, I'll pull it to GS extensions website. Should absolutely not introduce any bug, but I want to be sure it's working as intended with GS 40 (it is, as far as I tested).

sluedecke commented 3 years ago

Works fine for me now (version 55 from GS extensions site). Thank you for fixing it!

fthx commented 3 years ago

You're welcome. (I pushed this before your feedback since I had the time to test it in GS 40.)

If you have some BR or suggestions, don't hesitate.