GNOME Bugzilla – Bug 758676
alternate-tab doesn't scale program-icons/previews on hidpi installations
Last modified: 2016-05-26 16:01:47 UTC
I am not sure whether I chose the right component for this bug report. I chose app-switcher instead of extensions, because the description for extensions is "functionality that is not (currently) part of the GNOME Shell design, but could potentially be implemented as an extension". When using the gnome-shell extension alternate-tab from https://git.gnome.org/browse/gnome-shell-extensions, the program icons and previews do not scale properly on a hidpi system. The icons and previews are much too small. They should be the same size as on a non-hidpi screen without scaling. The app-switcher with grouping (enabled by default) seems to handle this properly, as these have a usable size. alternate-tab is used by many who prefer a non-grouping switcher.
Maybe it does indeed scale the icons - they are nearly as big as the previews and overlap them mostly.
(In reply to yannik from comment #0) > I am not sure whether I chose the right component for this bug report. It doesn't really matter (we are happy to reassign if necessary), but you accidentally picked the right component - the description of the "extensions" component needs updating, as it has been used for the gnome-shell-extensions module in a while; however this is not an issue with the alternate-tab extension, as the window-switcher is built-in and the extension just meddles with the default keybindings. > When using the gnome-shell extension alternate-tab from > https://git.gnome.org/browse/gnome-shell-extensions, the program icons and > previews do not scale properly on a hidpi system. The icons and previews are > much too small. They should be the same size as on a non-hidpi screen > without scaling. Can you provide a screenshot? I don't have a hidpi system available, so that should help with producing a patch that's not complete guesswork :-)
Thanks for your answer! I actually went on to debug this further and found about how this whole thing works :) I sadly can't provide a screenshot, as the screenshot function doesn't work while having the switcher dialog open. While fiddling with this, I tried multiple different WINDOW_PREVIEW_SIZE settings (in ui/altTab.js). 240 seemed to work very well. This should probably set dynamically based on the users dpi, or maybe configurable using a setting.
Created attachment 316276 [details] [review] altTab: Fix window-switcher on HiDPI displays We need to take the scale factor into account to avoid tiny window previews on HiDPI. (In reply to yannik from comment #3) > I sadly can't provide a screenshot, as the screenshot function doesn't work > while having the switcher dialog open. If you have gnome-screenshot installed, you can use the '-d' option to take a screenshot after a timeout. Otherwise you can use something like sleep 5; gdbus call --session --dest org.gnome.Shell.Screenshot --object-path /org/gnome/Shell/Screenshot --method org.gnome.Shell.Screenshot.Screenshot false true 'alt-tab' to take a screenshot after 5 seconds. I'm attaching an untested patch, testing with different settings would be appreciated!
Review of attachment 316276 [details] [review]: looks fine
Created attachment 316592 [details] screenshot before path
Created attachment 316593 [details] screenshot post patch
Attachment 316276 [details] pushed as 8091153 - altTab: Fix window-switcher on HiDPI displays Thanks for testing!
*** Bug 752757 has been marked as a duplicate of this bug. ***