After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 758676 - alternate-tab doesn't scale program-icons/previews on hidpi installations
alternate-tab doesn't scale program-icons/previews on hidpi installations
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: app-switcher
3.18.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 752757 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2015-11-25 20:36 UTC by yannik
Modified: 2016-05-26 16:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
altTab: Fix window-switcher on HiDPI displays (1.75 KB, patch)
2015-11-25 23:18 UTC, Florian Müllner
committed Details | Review
screenshot before path (145.03 KB, image/png)
2015-12-01 12:58 UTC, yannik
  Details
screenshot post patch (166.30 KB, image/png)
2015-12-01 12:59 UTC, yannik
  Details

Description yannik 2015-11-25 20:36:03 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.
Comment 1 yannik 2015-11-25 20:39:24 UTC
Maybe it does indeed scale the icons - they are nearly as big as the previews and overlap them mostly.
Comment 2 Florian Müllner 2015-11-25 21:31:13 UTC
(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 :-)
Comment 3 yannik 2015-11-25 22:45:21 UTC
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.
Comment 4 Florian Müllner 2015-11-25 23:18:32 UTC
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!
Comment 5 Rui Matos 2015-11-26 14:40:49 UTC
Review of attachment 316276 [details] [review]:

looks fine
Comment 6 yannik 2015-12-01 12:58:42 UTC
Created attachment 316592 [details]
screenshot before path
Comment 7 yannik 2015-12-01 12:59:06 UTC
Created attachment 316593 [details]
screenshot post patch
Comment 8 Florian Müllner 2015-12-02 09:36:06 UTC
Attachment 316276 [details] pushed as 8091153 - altTab: Fix window-switcher on HiDPI displays

Thanks for testing!
Comment 9 Florian Müllner 2016-05-26 16:01:47 UTC
*** Bug 752757 has been marked as a duplicate of this bug. ***