| Summary: | Latte Dock - Global Keyboard Shortcuts Stop Working / Multiple Entries Created | ||
|---|---|---|---|
| Product: | [Unmaintained] lattedock | Reporter: | scum.filter+kde |
| Component: | application | Assignee: | Michail Vourlakos <mvourlakos> |
| Status: | RESOLVED FIXED | ||
| Severity: | major | ||
| Priority: | NOR | ||
| Version First Reported In: | 0.8.2 | ||
| Target Milestone: | --- | ||
| Platform: | Neon | ||
| OS: | Linux | ||
| Latest Commit: | https://commits.kde.org/latte-dock/d0f1a7ffe6fb89a0da47825d7208bf5c46dc67db | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
| Attachments: | Multiple gloabl keyboard shortcut entries. | ||
Comment on attachment 116393 [details]
Multiple gloabl keyboard shortcut entries.
Are you using Multiple Layouts from Settings Window?
waiting info (In reply to Michail Vourlakos from comment #1) > Comment on attachment 116393 [details] > Multiple gloabl keyboard shortcut entries. > > Are you using Multiple Layouts from Settings Window? Hi Michail. Yes, I do have Multiple Layouts enabled in Settings. that makes sense... I really thank you for this, I would had never thought it... I will provide the technical details why this can happen and why it is difficult to fix but I will have it in my mind until something nice and elegant arise as a solution. 1. Each applet has a unique id 2. Latte is using multiple layouts which are independent of each other that can have same applet ids for some cases, this is not forbidden. 3. When Latte is using Multiple layouts mode then it combines 2 and more layouts together by creating a new temporary hidden layout that contains all applets from these layouts and updates also their applet ids in order to not conflict with each other. During [3] the global shortcuts assigned to applets might become inconsistent and as such either break the global shortcut of specific applet or create duplicate entries. Of course that could also happen with Single mode but it must be more rare. ---- Possible solution: 1. Latte layout(s) must become applets global shortcut activation aware. That would mean that layouts should be informed and store for their applets their corresponding global shortcuts. 2. When a latte layout is loaded either in single or multiple mode the layout should update the shortcuts assigned for kglobalaccel accordingly. ---- 3. If [1] and [2] are supported correctly then that would mean that we could provide the nice visual badges the Meta+` triggers in git version to show also for applets that have assigned global shortcuts through plasma infrastructure. (In reply to Michail Vourlakos from comment #4) > that makes sense... > > I really thank you for this, I would had never thought it... > > I will provide the technical details why this can happen and why it is > difficult to fix but I will have it in my mind until something nice and > elegant arise as a solution. > > 1. Each applet has a unique id > 2. Latte is using multiple layouts which are independent of each other that > can have same applet ids for some cases, this is not forbidden. > 3. When Latte is using Multiple layouts mode then it combines 2 and more > layouts together by creating a new temporary hidden layout that contains all > applets from these layouts and updates also their applet ids in order to not > conflict with each other. > > During [3] the global shortcuts assigned to applets might become > inconsistent and as such either break the global shortcut of specific applet > or create duplicate entries. > > Of course that could also happen with Single mode but it must be more rare. > > ---- > Possible solution: > 1. Latte layout(s) must become applets global shortcut activation aware. > That would mean that layouts should be informed and store for their applets > their corresponding global shortcuts. > 2. When a latte layout is loaded either in single or multiple mode the > layout should update the shortcuts assigned for kglobalaccel accordingly. > ---- > > 3. If [1] and [2] are supported correctly then that would mean that we could > provide the nice visual badges the Meta+` triggers in git version to show > also for applets that have assigned global shortcuts through plasma > infrastructure. Thanks for the explanation and your time Michail, greatly appreciated. I am not actively using multiple activities so I'll do some trial and error to see if I can get my configuration to a point where the issue isn't an impact on my usage until a fix can be addressed. Can you point me to the appropriate configuration file that contains the multiple entries I am seeing for the shortcuts? Thanks again. (In reply to scum.filter+kde from comment #5) > (In reply to Michail Vourlakos from comment #4) > Can you point me to the appropriate configuration file that contains the > multiple entries I am seeing for the shortcuts? Thanks again. file: ~/.config/kglobalshortcutsrc section: lattedock Git commit 46dd59b65a58f7f985c905e951bf08e82270e6bf by Michail Vourlakos. Committed on 27/01/2019 at 14:06. Pushed by mvourlakos into branch 'master'. cleanup applet shortcuts on startup --when Latte crashes the global shortcuts from applets remain untouched in kglobalshortcutsrc file. That fact based on the Latte architecture that can alter applet ids during layout loading can break the global shortcuts experience by creating multiple global shortcuts records for the same applet and by disabling some shortcuts because these shortcuts are already enabled for ghost applets of the crashed layout. This patch fixes this by removing all applet global shortcuts during startup. Applet global shortcuts are already saved in the layout file based on the current plasma architecture, that fact simplifies things a lot. M +21 -0 app/settings/universalsettings.cpp M +2 -0 app/settings/universalsettings.h https://commits.kde.org/latte-dock/46dd59b65a58f7f985c905e951bf08e82270e6bf (In reply to scum.filter+kde from comment #5) > (In reply to Michail Vourlakos from comment #4) > > I think I fixed it but you should try the git version in order to confirm that it is fixed. The previous explanation of the reason is faulty. Plasma applets are already saving their shortcuts in their configuration so the shortcuts are already present in the latte layout files. The issues arises when Latte is crashed. In such case the applets global shortcuts are not loaded properly from Plasma Global Shortcuts module. Simple fix is that during Latte startup all Latte applets shortcuts are removed and when the Latte layout is loaded then the plasma applets are doing their job properly by just adding their shortcuts which is the normal behavior. That of course means that if you try this patch it would mean that by just restaring Latte all your applets shortcuts will be fixed by their own!!! :) Please if you can try out the git version to confirm the fix it would help me a lot because in that way I could apply this patch also for next Latte stable version 0.8.6 Git commit d0f1a7ffe6fb89a0da47825d7208bf5c46dc67db by Michail Vourlakos. Committed on 27/01/2019 at 17:57. Pushed by mvourlakos into branch 'v0.8'. cleanup applet shortcuts on startup --when Latte crashes the global shortcuts from applets remain untouched in kglobalshortcutsrc file. That fact based on the Latte architecture that can alter applet ids during layout loading can break the global shortcuts experience by creating multiple global shortcuts records for the same applet and by disabling some shortcuts because these shortcuts are already enabled for ghost applets of the crashed layout. This patch fixes this by removing all applet global shortcuts during startup. Applet global shortcuts are already saved in the layout file based on the current plasma architecture, that fact simplifies things a lot. M +28 -0 app/universalsettings.cpp M +3 -0 app/universalsettings.h https://commits.kde.org/latte-dock/d0f1a7ffe6fb89a0da47825d7208bf5c46dc67db (In reply to Michail Vourlakos from comment #8) > Please if you can try out the git version to confirm the fix it would help > me a lot because in that way I could apply this patch also for next Latte > stable version 0.8.6 Unfortunately I'm not having success installing from git. I'm getting ‘class Latte::GlobalShortcuts’ has no member named ‘hideDockTimerSlot’; did you mean ‘hideDocksTimerSlot’? (In reply to scum.filter+kde from comment #10) > Unfortunately I'm not having success installing from git. I'm getting ‘class > Latte::GlobalShortcuts’ has no member named ‘hideDockTimerSlot’; did you > mean ‘hideDocksTimerSlot’? Okay, I located the lines to change in moc_globalshortcuts.cpp to address that error but am now getting error: initializer-string for array of chars is too long [-fpermissive] in .tmp/latte-dock/build/app/moc_globalshortcuts.cpp:41:1: A bit out of my depth at this point... Dont worry I merged it for 0.8.6 so you could test when it is released (In reply to Michail Vourlakos from comment #12) > Dont worry I merged it for 0.8.6 so you could test when it is released Figured things out and got 0.8.75 installed - everything is working well so far. Thanks much for all your help and work! (In reply to scum.filter+kde from comment #13) > (In reply to Michail Vourlakos from comment #12) > > Dont worry I merged it for 0.8.6 so you could test when it is released > > Figured things out and got 0.8.75 installed - everything is working well so > far. > > Thanks much for all your help and work! nice! Thank you! |
Created attachment 116393 [details] Multiple gloabl keyboard shortcut entries. Global Shortcuts stop working after reboot and multiple entries are introduced. STEPS TO REPRODUCE/OBSERVED RESULT 1. Set keyboard shortcut for widget (for example, Event Calendar, Weather, Notifications, etc.) by right-clicking on the widget, selecting Configure and setting the shortcut in Keyboard Shortcuts. 2. Reboot 3. Keyboard shortcuts remain in Global Shortcuts > Latte Dock, however a new entry is also added with an empty shortcut value and previously set shortcuts no longer work. EXPECTED RESULT Keyboard shortcuts should work after reboot and only a single entry should exist per widget. SOFTWARE/OS VERSIONS KDE neon User Edition 5.14 Release 18.04/Bionic plasmashell 5.14.3 lattedock 0.8.2