Workspace switcher "visual represenation" missing

Please post suggestions for improvement of Cinnamon here
https://github.com/linuxmint/Cinnamon
Post Reply
andrewsmith
Level 1
Level 1
Posts: 33
Joined: Thu Mar 08, 2012 10:33 pm

Workspace switcher "visual represenation" missing

Post by andrewsmith » Mon Aug 26, 2019 12:01 am

Hello

I've upgraded to Mint 19.2 recently on two machines. This problem only shows up on one of the machines:

I have the workspace switcher configured to "Type of display: A visual represenation of the workspaces". But it just shows me the workspace numbers, no previews of the applications.

On the other machine I see the rectangles representing the windows.

When I change the setting in the "Configure" window - the workspace switcher view gets refreshed, but it shows me the numbers only, no matter which of the two options I pick.

I've no idea how to fix this. Must be some weird setting leftover from who knows when, but I don't even know where to look to find this rogue configuration.

Help please?

User avatar
Moem
Level 19
Level 19
Posts: 9220
Joined: Tue Nov 17, 2015 9:14 am
Location: The Netherlands
Contact:

Re: Workspace switcher "visual represenation" missing

Post by Moem » Mon Aug 26, 2019 3:13 am

That workspace switcher is a panel applet. Check under Applets, maybe it'll help to remove the applet completely and then download and add it again.
Image

If your issue is solved, kindly indicate that by editing the first post in the topic, and adding [SOLVED] to the title. Thanks!

andrewsmith
Level 1
Level 1
Posts: 33
Joined: Thu Mar 08, 2012 10:33 pm

Re: Workspace switcher "visual represenation" missing

Post by andrewsmith » Mon Aug 26, 2019 10:12 am

It says it can't be removed because it's a system applet.

User avatar
Moem
Level 19
Level 19
Posts: 9220
Joined: Tue Nov 17, 2015 9:14 am
Location: The Netherlands
Contact:

Re: Workspace switcher "visual represenation" missing

Post by Moem » Mon Aug 26, 2019 10:24 am

Hmm! Sorry, then I'm out of ideas...
Image

If your issue is solved, kindly indicate that by editing the first post in the topic, and adding [SOLVED] to the title. Thanks!

User avatar
smurphos
Level 12
Level 12
Posts: 4113
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher
Contact:

Re: Workspace switcher "visual represenation" missing

Post by smurphos » Mon Aug 26, 2019 11:00 am

There was a change in Cinnamon 4.2 that forces the applet to label mode when the panel is under a certain width/height. There is a pending pull request to revert that change.

https://github.com/linuxmint/cinnamon/pull/8757

https://github.com/linuxmint/cinnamon/issues/8755
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.

andrewsmith
Level 1
Level 1
Posts: 33
Joined: Thu Mar 08, 2012 10:33 pm

Re: Workspace switcher "visual represenation" missing

Post by andrewsmith » Mon Aug 26, 2019 11:06 am

That explains it, thanks! On the working machine the panel is 32 pixels. On the one that wasn't working it was 28. But changing it up to 32 doesn't seem to help. Looks like I need it to be 38 pixels high at least, probably because I have a second monitor configured to be at the bottom.

Do you have any suggestions on how I could get around that other than waiting for a new version of cinnamon? I guess I could try to rearrange my screen configuration, but I really like that I have "solid" left and right edges on my main monitor. This way I don't have the mouse going off screen all the time.

User avatar
smurphos
Level 12
Level 12
Posts: 4113
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher
Contact:

Re: Workspace switcher "visual represenation" missing

Post by smurphos » Mon Aug 26, 2019 11:08 pm

I don't have access to my Mint machine at the moment to give more detailed guidance but you should be able to fix by making a copy of the applets folder from /usr/share/cinnamon/applets/ to ~/.local/share/cinnamon/applets/ and then edit the local copies applet.js file to apply Simon's fix in its entirety as per https://github.com/brownsr/Cinnamon/com ... 2a1dd8ad83

The link shows the changes that need to be made the the applet's applet.js file, basically a section deleted and two other lines modified.

If you are not confident to do that in its entirety just changing all instances of suspend_graph = true to suspend_graph = false should also work.

Once you have made the edits, restart cinnamon with CTRL-ALT-ESC
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.

andrewsmith
Level 1
Level 1
Posts: 33
Joined: Thu Mar 08, 2012 10:33 pm

Re: Workspace switcher "visual represenation" missing

Post by andrewsmith » Sun Sep 01, 2019 11:41 pm

Thank you! For others who want to follow smurphos's instructions, here is the patch:

Code: Select all

From 92e6b40573514041fdae16ff4392972a1dd8ad83 Mon Sep 17 00:00:00 2001
From: brownsr <simonrossbrown@gmail.com>
Date: Sat, 3 Aug 2019 13:42:25 +0100
Subject: [PATCH] Workspace switcher : remove arbitrary cutover to buttons the
 graph is actually visible and usable to some degree right down to the
 smallest panel size that can be set so there is no reason to switch over to
 buttons, which has confused at least one user.  Removing the tests simplifies
 things. fixes #8755

---
 .../workspace-switcher@cinnamon.org/applet.js | 27 +++----------------
 1 file changed, 3 insertions(+), 24 deletions(-)

diff --git a/files/usr/share/cinnamon/applets/workspace-switcher@cinnamon.org/applet.js b/files/usr/share/cinnamon/applets/workspace-switcher@cinnamon.org/applet.js
index 03d0592a79..1112dfcc51 100644
--- a/files/usr/share/cinnamon/applets/workspace-switcher@cinnamon.org/applet.js
+++ b/files/usr/share/cinnamon/applets/workspace-switcher@cinnamon.org/applet.js
@@ -385,28 +385,7 @@ class CinnamonWorkspaceSwitcher extends Applet.Applet {
             this.buttons[i].destroy();
         }
 
-        // we're just doing a rough estimate here, but less than about 20px in either
-        // direction makes visual layout useless.
-        let suppress_graph = false;
-        if (this._panelHeight < 26) suppress_graph = true;
-        else {
-            let workspace_size = new Meta.Rectangle();
-            global.screen.get_workspace_by_index(0).get_work_area_all_monitors(workspace_size);
-            if (this.orientation == St.Side.LEFT || this.orientation == St.Side.RIGHT) {
-                let estHeight = (this._panelHeight - 6) / workspace_size.width * workspace_size.height;
-                if (estHeight < 20) {
-                    suppress_graph = true;
-                }
-            }
-            else {
-                let estWidth = (this._panelHeight - 6) / workspace_size.height * workspace_size.width;
-                if (estWidth < 20) {
-                    suppress_graph = true;
-                }
-            }
-        }
-
-        if (this.display_type == "visual" && !suppress_graph)
+        if (this.display_type == "visual")
             this.actor.set_style_class_name('workspace-graph');
         else
             this.actor.set_style_class_name('workspace-switcher');
@@ -415,7 +394,7 @@ class CinnamonWorkspaceSwitcher extends Applet.Applet {
 
         this.buttons = [];
         for (let i = 0; i < global.screen.n_workspaces; ++i) {
-            if (this.display_type == "visual" && !suppress_graph)
+            if (this.display_type == "visual")
                 this.buttons[i] = new WorkspaceGraph(i, this);
             else
                 this.buttons[i] = new SimpleButton(i, this);
@@ -425,7 +404,7 @@ class CinnamonWorkspaceSwitcher extends Applet.Applet {
         }
 
         this.signals.disconnect("notify::focus-window");
-        if (this.display_type == "visual" && !suppress_graph) {
+        if (this.display_type == "visual") {
             // In visual mode, keep track of window events to represent them
             this.signals.connect(global.display, "notify::focus-window", this._onFocusChanged, this);
             this._onFocusChanged();

Post Reply

Return to “Cinnamon”