jaszhix / icingtaskmanager

Window list with app grouping and thumbnails for Cinnamon
https://cinnamon-spices.linuxmint.com/applets/view/269
GNU General Public License v2.0
61 stars 12 forks source link

splash windows frozes in taskbar #33

Closed samogot closed 7 years ago

samogot commented 7 years ago

splash windows which is sown on start of several applications (for example dicord-canary) is newer gone from taskbar

image

i think it is related error

(cinnamon:608): Cjs-WARNING **: JS ERROR: TypeError: metaWindow.get_title is not a function
_windowTitleChanged@/home/samogot/.local/share/cinnamon/applets/IcingTaskManager@json/appGroup.js:462
_updateMetaWindows@/home/samogot/.local/share/cinnamon/applets/IcingTaskManager@json/appGroup.js:365
_windowAdded@/home/samogot/.local/share/cinnamon/applets/IcingTaskManager@json/appList.js:149
jaszhix commented 7 years ago

Please list your Cinnamon version, extension version, and Linux distribution.

samogot commented 7 years ago

archlinux cinnamon 3.2.1-4 ITM 3.1.0

jaszhix commented 7 years ago

Have you tried upgrading to 3.1.2 via the applet manager?

samogot commented 7 years ago

wow.... i've just tried it, and... ITM fail to start now

error t=2016-11-15T11:12:56Z illegal character
error t=2016-11-15T11:12:56Z [Applet "IcingTaskManager@json"]: Error importing applet.js from IcingTaskManager@json
error t=2016-11-15T11:12:56Z Could not load applet IcingTaskManager@json

i've just clone master and copy src dir overriding contents of ~/.local/share/cinnamon/applets/IcingTaskManager@json/

jaszhix commented 7 years ago

How did you initially install it? Trying uninstalling it, remove it completely, and install from the applet manager. If you used the Github repo, you have to follow the instructions under Contributing in the readme.

samogot commented 7 years ago

ok, i've reinstalled it from the applet manager, but updating don't help - dead splash window is still here

jaszhix commented 7 years ago

I have been testing this in both 3.07 and Cinnamon nightly for the last few versions, and it is working fine for me. Did you fully remove it first?

jaszhix commented 7 years ago

Also, if you provide the output of cat ~/.cinnamon/configs/IcingTaskManager@json/*.json, that would be helpful.

samogot commented 7 years ago

yes, I removed applet folder, then install in from applet manager

# cat ~/.cinnamon/configs/IcingTaskManager@json/*.json
{
    "WindowList": {
        "type": "header",
        "description": "Window List Settings"
    },
    "seperator1": {
        "type": "separator"
    },
    "number-display": {
        "type": "combobox",
        "default": 1,
        "description": "Number display:",
        "options": {
            "Smart": 1,
            "Normal": 2,
            "None": 3,
            "All": 4
        },
        "tooltip": "normal: display window number, smart: display window number if more than one window, none: don't display number, all: display window number for favorites too",
        "value": 1
    },
    "title-display": {
        "type": "combobox",
        "default": 1,
        "description": "Title display:",
        "options": {
            "None": 1,
            "App": 2,
            "Title": 3,
            "Focused": 4
        },
        "tooltip": "focused: show focused window title, title: display the window title, app: diplay app name, none: don't display anything",
        "value": 1
    },
    "pinned-apps": {
        "type": "generic",
        "default": [],
        "value": [
            "sublime_text_3.desktop",
            "doublecmd.desktop",
            "google-chrome.desktop"
        ]
    },
    "show-alerts": {
        "type": "checkbox",
        "default": true,
        "description": "Show app alerts and notifications",
        "tooltip": "If enabled, notifications and alerts will appear.",
        "value": true
    },
    "show-pinned": {
        "type": "checkbox",
        "default": true,
        "description": "Show pinned apps",
        "tooltip": "Controls whether or not the pinned apps appear in the panel if they are not open.",
        "value": true
    },
    "arrange-pinnedApps": {
        "type": "checkbox",
        "default": true,
        "description": "Arrange pinned apps",
        "tooltip": "Arrange pinned apps into a different order.",
        "value": true
    },
    "icon-padding": {
        "type": "spinbutton",
        "default": 7,
        "min": 0,
        "max": 15,
        "step": 1,
        "units": "px",
        "description": "Icon padding:",
        "tooltip": "Controls how much space is between the icons.",
        "value": 4
    },
    "enable-iconSize": {
        "type": "checkbox",
        "default": false,
        "description": "Adjust icon size",
        "tooltip": "Adjust icon size independent of Cinnamon's panel scaling.",
        "value": false
    },
    "icon-size": {
        "type": "spinbutton",
        "default": 20,
        "min": 0,
        "max": 150,
        "step": 1,
        "units": "px",
        "description": "Icon size:",
        "tooltip": "Set icon size",
        "value": 20
    },
    "HoverPeek": {
        "type": "header",
        "description": "Hover Peek Settings"
    },
    "seperator2": {
        "type": "separator"
    },
    "enable-hover-peek": {
        "type": "checkbox",
        "default": false,
        "description": "Show windows when hovered over",
        "tooltip": "Controls whether or not windows display when hovered over.",
        "value": false
    },
    "hover-peek-time": {
        "type": "spinbutton",
        "default": 50,
        "min": 0,
        "max": 1000,
        "step": 5,
        "units": "milliseconds",
        "description": "Window fade time:",
        "tooltip": "Controls how quickly a window will fade on hover.",
        "value": 50
    },
    "hover-peek-opacity": {
        "type": "spinbutton",
        "default": 10,
        "min": 0,
        "max": 100,
        "step": 2,
        "units": "percent",
        "description": "Window opacity:",
        "tooltip": "Opacity of the windows on hover.",
        "value": 10
    },
    "Thumbnails": {
        "type": "header",
        "description": "Thumbnail Settings"
    },
    "seperator3": {
        "type": "separator"
    },
    "thumbnail-timeout": {
        "type": "spinbutton",
        "default": 50,
        "min": 0,
        "max": 5000,
        "step": 50,
        "units": "milliseconds",
        "description": "Thumbnail timeout:",
        "tooltip": "Controls how quickly an app's set of window thumbnails will fade out when the mouse leaves the app button.",
        "value": 50
    },
    "thumbnail-size": {
        "type": "spinbutton",
        "default": 6,
        "min": 0,
        "max": 100,
        "step": 1,
        "units": "size",
        "description": "Thumbnail size:",
        "tooltip": "Controls the size of the thumbnails.",
        "value": 6
    },
    "show-thumbnails": {
        "type": "checkbox",
        "default": true,
        "description": "Show thumbnails",
        "tooltip": "Show window thumbnails when hovering over an app button.",
        "value": true
    },
    "vertical-thumbnails": {
        "type": "checkbox",
        "default": false,
        "description": "Enable vertical thumbnails",
        "tooltip": "If enabled, thumbnails will stack vertically.",
        "value": false
    },
    "stack-thumbnails": {
        "type": "checkbox",
        "default": true,
        "description": "Stack window thumbnails",
        "tooltip": "Stack window thumbnails if they exceed the available screen space.",
        "value": true
    },
    "sort-thumbnails": {
        "type": "checkbox",
        "default": false,
        "description": "Sort windows for each app by last focused",
        "tooltip": "Controls whether the order windows appear for an app is by last focused, or the order they were opened.",
        "value": false
    },
    "onclick-thumbnails": {
        "type": "checkbox",
        "default": false,
        "description": "Open thumbnails on click",
        "tooltip": "Open the thumbnails on click if there is more than one window open.",
        "value": false
    },
    "AppMenu": {
        "type": "header",
        "description": "Context Menu Settings"
    },
    "seperator4": {
        "type": "separator"
    },
    "show-recent": {
        "type": "checkbox",
        "default": true,
        "description": "Show recent items",
        "tooltip": "Controls whether recent items will appear in the context menu.",
        "value": true
    },
    "closeall-menu-item": {
        "type": "checkbox",
        "default": false,
        "description": "Enable option to close all windows",
        "tooltip": "Show a \"Close All\" context menu item to close all windows for an app.",
        "value": true
    },
    "appmenu-width": {
        "type": "spinbutton",
        "default": 195,
        "min": 100,
        "max": 500,
        "step": 10,
        "units": "px",
        "description": "Context menu width:",
        "tooltip": "Set the width of the context menu.",
        "value": 195
    },
    "firefox-menu": {
        "type": "combobox",
        "default": 1,
        "description": "Firefox context menu:",
        "options": {
            "Most Visited": 1,
            "Recent History": 2,
            "Bookmarks": 3
        },
        "tooltip": "Most Visited: show the sites you visit most, Recent History: display the the last pages you visited, Bookmarks: show your favorite bookmarks.",
        "value": 1
    },
    "appmenu-number": {
        "type": "spinbutton",
        "default": 10,
        "min": 0,
        "max": 50,
        "step": 1,
        "units": "number",
        "description": "Number of context menu items:",
        "tooltip": "Controls how many items appear in the context menu.",
        "value": 10
    },
    "__md5__": "f1e4d66e2614fefe8e7452755b8022c9"
}                                                                                                                                                                                           
jaszhix commented 7 years ago

Can you try this zip file from the Spices website? Sometimes the applet manager lags behind the website. Also, the website isn't loading for me, keeps timing out, but I was able to get the zip link.

jaszhix commented 7 years ago

ITM-dist-1479172913056.zip Or better yet, try that.

samogot commented 7 years ago

still there

also if it will help, here is an error messages, when i'm trying to click on dead item or close it through context menu

# clicking
(cinnamon:597): Cjs-WARNING **: JS ERROR: TypeError: win is undefined
handleMinimizeToggle@/home/samogot/.local/share/cinnamon/applets/IcingTaskManager@json/appGroup.js:252
_onAppButtonRelease@/home/samogot/.local/share/cinnamon/applets/IcingTaskManager@json/appGroup.js:273

# closing
(cinnamon:597): St-WARNING **: Did not find color property '-gradient-start'

(cinnamon:597): St-WARNING **: Did not find color property '-gradient-end'

(cinnamon:597): St-WARNING **: Did not find color property '-gradient-start'

(cinnamon:597): St-WARNING **: Did not find color property '-gradient-end'

(cinnamon:597): St-WARNING **: Did not find color property '-gradient-start'

(cinnamon:597): St-WARNING **: Did not find color property '-gradient-end'

(cinnamon:597): St-WARNING **: Did not find color property '-gradient-start'

(cinnamon:597): St-WARNING **: Did not find color property '-gradient-end'

(cinnamon:597): Cjs-WARNING **: JS ERROR: Exception in callback for signal: activate: TypeError: this.metaWindow is undefined
_onCloseWindowActivate@/home/samogot/.local/share/cinnamon/applets/IcingTaskManager@json/specialMenus.js:625
_emit@resource:///org/gnome/gjs/modules/signals.js:140
PopupBaseMenuItem.prototype.activate@/usr/share/cinnamon/js/ui/popupMenu.js:177
PopupBaseMenuItem.prototype._onButtonReleaseEvent@/usr/share/cinnamon/js/ui/popupMenu.js:150
jaszhix commented 7 years ago

My guess is there is a weird window open that isn't giving Muffin all the info the extension needs. Could you reload your session with the extension loaded, and see if it occurs on the session init with just basic windows like Nemo? Then see which app triggers it.

samogot commented 7 years ago

it occurs only on some weird windows. for me it is start-up splash windows of discordapp and ms-office (2010) components (word, excel) runned through Wine. other splash windows like in skype-for-linux-alpha or photoshop (runned through Wine) are ok

jaszhix commented 7 years ago

Ok, I'll try to reproduce it and see if I can get the applet to handle these exceptions more gracefully.

jaszhix commented 7 years ago

I think its MS Office in Wine maybe? I launched Discord Canary in both 3.07 and 3.2 running in my VM with the same version of ITM you installed, and no issues. Wine apps in particular are window backed, and cannot be pinned because Cinnamon doesn't keep track of how to relaunch them again. They're the most likely to not play nice with the window manager.

jaszhix commented 7 years ago

Personally, I run Windows software in Windows VM using VMware because Wine apps are a headache and never play natively, and Virtualbox's hardware acceleration sucks.

samogot commented 7 years ago

maybe this problem also related to the version of library which represent metaWindow object... i'm don't know which library it is. Anyway, small obvious fix cure this issue:

var title = metaWindow.get_title ? metaWindow.get_title() : undefined;

btw wine apps can be pinned and also play nice) in case if user will set up correct WM_CLASS in .desktop file of this wine app.

samogot commented 7 years ago

oops, i've missed the button)

jaszhix commented 7 years ago

Which file did you paste that into? There are three functions that call that window API method.

jaszhix commented 7 years ago

What I am trying to figure out is which method is passing the bunk parameter, and i'd rather check its existence earliest in the call stack as possible.

samogot commented 7 years ago

as the error message says:

(cinnamon:597): Cjs-WARNING **: JS ERROR: TypeError: metaWindow.get_title is not a function
_windowTitleChanged@/home/samogot/.local/share/cinnamon/applets/IcingTaskManager@json/appGroup.js:468
jaszhix commented 7 years ago

That doesn't necessarily mean we're fixing all the bugs that undefined metaWindow parameter can cause by patching that exact line.

samogot commented 7 years ago

yes, i understand it) that's why I've started from writing an issue rather than fixing it by myself but if you cannot reproduce it - patching that line is better than do nothing

jaszhix commented 7 years ago

No worries, I'll have a patch ready soon.

jaszhix commented 7 years ago

Could you try this version? I think I narrowed down the problem, and an array is getting passed to it.

ITM-dist-1479210109160.zip

samogot commented 7 years ago

yeah, it works fine

jaszhix commented 7 years ago

Excellent, thanks