spheras / desktopfolder

Bring your Desktop Back to Life
GNU General Public License v3.0
200 stars 40 forks source link

Icons disappear when changing desktop #296

Closed gabriel-ab closed 4 years ago

gabriel-ab commented 4 years ago

Description

Icons disappear when switching desktops, visual problem

Steps to reproduce

On elementary os

  1. Super + →
  2. Super + ←

Expected result

if it shouldn't appear on both screens, at least the first one should keep the app view

Actual result

The right click and double click still works but the icons desappear

Screen record from 2020-04-11 11 44 56

System Information

Terminal output

$ env G_MESSAGES_DEBUG=all com.github.spheras.desktopfolder (com.github.spheras.desktopfolder:6428): Gtk-DEBUG: 11:34:52.253: Connecting to session manager (com.github.spheras.desktopfolder:6428): DEBUG: 11:34:52.255: Application.vala:99: startup event (com.github.spheras.desktopfolder:6428): DEBUG: 11:34:52.255: Application.vala:86: activate event (com.github.spheras.desktopfolder:6428): DEBUG: 11:34:52.256: Application.vala:239: show_desktoppanel: true (com.github.spheras.desktopfolder:6428): DEBUG: 11:34:52.393: FolderManager.vala:259: Monitoring: /home/gabriel/Desktop (com.github.spheras.desktopfolder:6428): DEBUG: 11:34:52.393: DesktopWindow.vala:97: trying to hide (com.github.spheras.desktopfolder:6428): DEBUG: 11:34:52.393: DesktopManager.vala:83: hide_items false (com.github.spheras.desktopfolder:6428): DEBUG: 11:34:52.393: DesktopManager.vala:84: hiding items (com.github.spheras.desktopfolder:6428): DEBUG: 11:34:52.393: FolderManager.vala:1106: >>>>>>>>>>> INIT _sync_files for Panel: (com.github.spheras.desktopfolder:6428): DEBUG: 11:34:52.393: FolderManager.vala:1114: >>>>>>>>>>>>>>>>>>>>>>>RESTARTING _sync_files 0 times for Panel (com.github.spheras.desktopfolder:6428): DEBUG: 11:34:52.394: FolderManager.vala:1149: syncing file found:/home/gabriel/Desktop//Hitman Blood Money.desktop (com.github.spheras.desktopfolder:6428): DEBUG: 11:34:52.394: FolderManager.vala:1149: syncing file found:/home/gabriel/Desktop//CS2D.desktop (com.github.spheras.desktopfolder:6428): DEBUG: 11:34:52.394: FolderManager.vala:1149: syncing file found:/home/gabriel/Desktop//TowerFall Ascension.desktop (com.github.spheras.desktopfolder:6428): DEBUG: 11:34:52.394: FolderManager.vala:1149: syncing file found:/home/gabriel/Desktop//Brawlhalla.desktop (com.github.spheras.desktopfolder:6428): DEBUG: 11:34:52.394: FolderManager.vala:1149: syncing file found:/home/gabriel/Desktop//Super Crate Box.desktop (com.github.spheras.desktopfolder:6428): DEBUG: 11:34:52.394: FolderManager.vala:1149: syncing file found:/home/gabriel/Desktop//UNO.desktop (com.github.spheras.desktopfolder:6428): DEBUG: 11:34:52.395: FolderManager.vala:1149: syncing file found:/home/gabriel/Desktop//Garry's Mod.desktop (com.github.spheras.desktopfolder:6428): DEBUG: 11:34:52.395: FolderManager.vala:1149: syncing file found:/home/gabriel/Desktop//.desktopfolder (com.github.spheras.desktopfolder:6428): DEBUG: 11:34:52.395: FolderManager.vala:1149: syncing file found:/home/gabriel/Desktop//folder (com.github.spheras.desktopfolder:6428): DEBUG: 11:34:52.797: DesktopWindow.vala:97: trying to hide (com.github.spheras.desktopfolder:6428): DEBUG: 11:34:52.797: DesktopManager.vala:83: hide_items false (com.github.spheras.desktopfolder:6428): DEBUG: 11:34:52.797: DesktopManager.vala:84: hiding items (com.github.spheras.desktopfolder:6428): DEBUG: 11:34:52.798: DesktopWindow.vala:97: trying to hide (com.github.spheras.desktopfolder:6428): DEBUG: 11:34:52.798: DesktopManager.vala:83: hide_items false (com.github.spheras.desktopfolder:6428): DEBUG: 11:34:52.798: DesktopManager.vala:84: hiding items (com.github.spheras.desktopfolder:6428): DEBUG: 11:34:52.798: FolderManager.vala:1281: >>>>>>>>>>> END _sync_files for Panel: (com.github.spheras.desktopfolder:6428): DEBUG: 11:34:52.799: DesktopManager.vala:149: Dock window found: wingpanel (com.github.spheras.desktopfolder:6428): DEBUG: 11:34:52.827: DesktopManager.vala:149: Dock window found: plank (com.github.spheras.desktopfolder:6428): DEBUG: 11:34:52.849: DesktopManager.vala:128: DESKTOP SIZE CHANGED! (0,0) (1360,768) ** (com.github.spheras.desktopfolder:6428): DEBUG: 11:34:52.859: Application.vala:571: Monitoring: /home/gabriel/Desktop

(com.github.spheras.desktopfolder:6428): DEBUG: 11:34:53.428: Application.vala:637: desktop_visible is now true (com.github.spheras.desktopfolder:6428): DEBUG: 11:34:53.428: DesktopWindow.vala:94: refresh, icons enabled and desktop visibility = true ** (com.github.spheras.desktopfolder:6428): DEBUG: 11:35:03.894: FolderWindow.vala:1039: event key 65513

jonklinger commented 4 years ago

can confirm and reproduce here.

rengare commented 4 years ago

Well I found out that they don't disappear, they are just transparent Edit Summarize, when virtual desktop changed, css values are overwritten (I believe by the system) @spheras I'm not gtk developer nor vala but I think you can fix it by somehow force importance of your styles Peek 2020-04-22 11-14

rengare commented 4 years ago

Im working on fix ;)

gkdgoutam commented 4 years ago

Same problem with even no right click. The desktop is showing only for the first boot. After that when switching workspaces it disappears competely from all workspaces even from the first workspace on eOS HERA-5.1.3.

codingsilverwolf commented 4 years ago

I'm confirming this issue on Hera 5.1.3. I'm too ignorant for fixing. @rengare our faith is on you 🙏️.

rengare commented 4 years ago

I have created a workaround for the issue. If you are in a hurry you can grab my branch and compile the code. (branch link)

spheras commented 4 years ago

I'm reopening the issue as I experienced problems when changing the workspace very fast. The system seems to crash sometimes. Looking for a solution.

rengare commented 4 years ago

@spheras no but I didn't change workspace fast, indeed there is a problem. Edit I caught the error and this is the call stack image

image

when desktop is set to null in on_workspace_change method, monitor wants to access reference to destkop which is no longer there

rengare commented 4 years ago

@spheras When you use this code, it not crash anymore, until you uncomment this.sync_folders_and_notes();. Maybe it will be helpful for you, my laptop's battery is off so I'll try to fix it in the evening or tomorrow

private void on_workspace_change(Wnck.Workspace? previous) {
        Timeout.add (500, () => {
            this.hide_everything ();

            this.clear_folders ();
            this.clear_notes ();
            this.clear_photos ();

            this.desktop_visible = false;
            this.desktop = null;
            return false;
        });
        Timeout.add (1000, () => {
            this.desktop_visible = true;
            this.desktop = new DesktopFolder.DesktopManager (this);

            this.show_everything ();
            //  this.sync_folders_and_notes();
            return false;
        });
    }
spheras commented 4 years ago

thanks @rengare, in my case, with this function, it continue freezing (and crashing sometimes) the laptop when I change the workspace rapidly. I'm trying to find the source of the problem. It is interesting to see how the gtk inspector is able to show again the parent desktop window, simply modifying the visible property.

spheras commented 4 years ago

@rengare, I did some changes to avoid crashing and simplifying a lot the solution.

  1. Simply changing the visibility from false to true
  2. Taking care of the thread created to remove it if another change is performed

It seems to work properly here, could you check a bit to ensure it is correct? Thx!

rengare commented 4 years ago

Sure I'll do that :)

rengare commented 4 years ago

On VM it sometimes crashes but it works fine on the real machine

spheras commented 4 years ago

Ok, thx!, I think we can close the issue for now. This issue is strange, and it seems really an issue for the window manager (gala), or something like that. I would like to know if this occurs also with other window managers.