Skip to content
This repository has been archived by the owner on Jul 7, 2019. It is now read-only.

Enhancements on window's thumbnails #71

Merged
merged 4 commits into from
Dec 31, 2016
Merged

Enhancements on window's thumbnails #71

merged 4 commits into from
Dec 31, 2016

Conversation

zqq90
Copy link
Contributor

@zqq90 zqq90 commented Dec 31, 2016

Two features:

  • Highlight focused window's thumbnail
  • Show thumbnails when switch windows using (Super+#)

BTW, should we add a switch the second one in settings?

@zqq90 zqq90 changed the title Enhancements window's thumbnails Enhancements on window's thumbnails Dec 31, 2016
Copy link
Owner

@jaszhix jaszhix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added some change request notes for some minor problems, but I really like this change and think it will make it easier for people to use this applet.

As for your question about adding a settings option, I think since we already made Super+# cycle through an app's windows, the thumbnail menu popup makes that more usable, so I don't think a new setting is needed.

@@ -904,8 +917,7 @@ WindowThumbnail.prototype = {
this.actor.connect('leave-event', ()=>{
if (!this.isFavapp) {
this._hoverPeek(OPACITY_OPAQUE, this.metaWindow, false)
this.actor.remove_style_pseudo_class('outlined')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you re-add these lines? This is causing the thumbnails to enlarge when cycling Super+#.

@@ -953,6 +967,16 @@ WindowThumbnail.prototype = {
this.actor.remove_style_class_name('thumbnail-alerts')
}
},

_focusWindowChange: function () {
if (this._hasFocus()) {
Copy link
Owner

@jaszhix jaszhix Dec 31, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw this error from ~/.xsession-errors:

(cinnamon:7207): Cjs-WARNING **: JS ERROR: TypeError: this.metaWindow is null
_hasFocus@/home/jason/.local/share/cinnamon/applets/IcingTaskManager@json/specialMenus.js:1037
_focusWindowChange@/home/jason/.local/share/cinnamon/applets/IcingTaskManager@json/specialMenus.js:1027
_init/<@/home/jason/.local/share/cinnamon/applets/IcingTaskManager@json/specialMenus.js:985
setTimeout/<@/home/jason/.local/share/cinnamon/applets/IcingTaskManager@json/__init__.js:10

Maybe we should add this.metaWindow && this.metaWindow.minimized to Line 984 in specialMenus.js

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or before those if blocks:

if (!this.metaWindow) {
  return false
}

@zqq90
Copy link
Contributor Author

zqq90 commented Dec 31, 2016

Another problem is, menus willn't close before release super key, if press another number, which bindings to an AppGroup only handles one window.

do you have any idea ?

@jaszhix jaszhix merged commit 4278b86 into jaszhix:master Dec 31, 2016
@jaszhix
Copy link
Owner

jaszhix commented Dec 31, 2016

I'm not sure, when I switch app numbers with Super+#, it seems to behave as expected - as soon as Super is released the menu disappears - is this what you intend?

@zqq90
Copy link
Contributor Author

zqq90 commented Dec 31, 2016

@jaszhix
reproduce: one app with more than one windows at N, another only opened one window at M ,
press Super + N , release N and hold Super , press M

@jaszhix
Copy link
Owner

jaszhix commented Dec 31, 2016

Oh ok, I got it now.

@jaszhix
Copy link
Owner

jaszhix commented Dec 31, 2016

Ok, I think I fixed it with this commit. Can you test it?

Edit: It fixes it but makes opening the menu require an extra key stroke.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants