UbuntuBudgie / budgie-extras

Additional Budgie Desktop enhancements for user experience
https://ubuntubudgie.org
GNU General Public License v3.0
175 stars 34 forks source link

ShowTime is only displayed on my main monitor #477

Closed dtrunk90 closed 1 month ago

dtrunk90 commented 1 month ago

I'm trying to display the "ShowTime" applet on all of my 3 monitors but it's only shown on the main monitor even though "On all monitors" is checked in the desktop settings. Is there any way to debug this like checking if there is any error message in a log?

Version installed: 1.7.1+202405071503~ubuntu23.10.1

fossfreedom commented 1 month ago

Thanks for raising this.

Further development of showtime is in the wayland direction. Whether "allmonitors" will form a basis of the wayland implementation is yet to be determined.

We'll add this issue in our thinking moving forward.

BTW 23.10 is now EOL - it will not receive anymore security or other updates. Please uplift asap to 24.04.

dtrunk90 commented 1 month ago

I'm on Debian 12 Bookworm, but noticed it didn't work with the version provided at the bookworm repo (1.5.0-2). So I've updated it to the last possible version without having dependency conflicts because I've thought it might be an issue with that old version. Couldn't make it to 1.8.0 because of dependency conflicts unfortunately. I'm still asking for a way to debug why it's not working. If I can find out what's the reason I'll fix it myself and rebuild the applet. But I couldn't find any logs.

fossfreedom commented 1 month ago

There are no relevant logs produced by the applet. The only way to debug this is to add "warning" type statements to the budgie-showtime source code to find out what is going on. These will be output to journalctl - and if you run budgie-panel --replace & they will appear as terminal stdout messages.

fossfreedom commented 1 month ago

BTW - probably in and around here is where to look https://github.com/UbuntuBudgie/budgie-extras/blob/f61db0c0deba6812e9a4f3f535c3b5c2bc39a0ce/budgie-showtime/src/showtime/BudgieShowTime.vala#L69

dtrunk90 commented 1 month ago

Just figured out there were no changes in ShowTime since 1.5.90 so it wouldn't be fixed in 1.8.0 either. I've noticed on Ubuntu 20.04 with 1.0.2-0ubuntu1 it worked. And I've noticed commit f907ad5. That's why I've upgraded because I thought this would fix my issue. So, now I'm investigating. Thanks. I'll provide some more info here once I've figured out someting.

dtrunk90 commented 1 month ago

So I figured out the budgie applet uuid is the same for all 3 showtime applets which is the reason only 1 window gets created. With this patch applied it works on all 3 monitors:

diff --git a/budgie-showtime/src/showtime_desktop/showtime_desktop.vala b/budgie-showtime/src/showtime_desktop/showtime_desktop.vala
index 0520033..94fef8d 100644
--- a/budgie-showtime/src/showtime_desktop/showtime_desktop.vala
+++ b/budgie-showtime/src/showtime_desktop/showtime_desktop.vala
@@ -505,12 +505,12 @@ namespace  ShowTime {

     public static void main (string[] args) {
         /* 0 = application, 1=uuid, 2=monitor, 3=x, 4=y */
-        string uuid = args[1];
+        string uuid = args[1].concat("_").concat(args[2]);
         Gtk.init(ref args);
         win_name = "Showtime";
         if (args.length == 5) {
             subwindow = true;
-            win_name = "Showtime_".concat(args[1]);
+            win_name = "Showtime_".concat(uuid);
             custom_posargs = {int.parse(args[3]), int.parse(args[4])};
         }
         new TimeWindow(uuid);

Now wmctrl -l returns:

0x02400003 -1 danny Showtime
0x05e00003 -1 danny Showtime_052ae390-484b-11ef-bd13-d85ed3050e4b_DisplayPort-0
0x06000003 -1 danny Showtime_052ae390-484b-11ef-bd13-d85ed3050e4b_DisplayPort-2