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 754607 - screenshot windows are too small on a hidpi monitor
screenshot windows are too small on a hidpi monitor
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: extensions
3.16.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2015-09-05 17:21 UTC by Andreas Nilsson
Modified: 2016-01-08 14:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot-window-sizer: hidpi support (2.17 KB, patch)
2016-01-08 08:29 UTC, Will Thompson
none Details | Review
screenshot-window-sizer: hidpi support (3.32 KB, patch)
2016-01-08 14:15 UTC, Will Thompson
committed Details | Review

Description Andreas Nilsson 2015-09-05 17:21:06 UTC
Sorry for possibly assigning to the wrong component. I couldn't find one for gnome-shell-extensions.

The gnome-shell-extension-screenshot-window-sizer extension works, but it gives the wrong sizes on my hidpi monitor. It would need to double the numbers to be correct.
Comment 1 Will Thompson 2016-01-08 08:29:02 UTC
Created attachment 318451 [details] [review]
screenshot-window-sizer: hidpi support
Comment 2 Will Thompson 2016-01-08 08:29:34 UTC
(In reply to Will Thompson from comment #1)
> Created attachment 318451 [details] [review] [review]
> screenshot-window-sizer: hidpi support

I've not tested this on a low-dpi screen, mind you :-)
Comment 3 Florian Müllner 2016-01-08 13:03:22 UTC
Review of attachment 318451 [details] [review]:

(In reply to Will Thompson from comment #2)
> I've not tested this on a low-dpi screen, mind you :-)

I did, but *only* on a low-dpi screen :-)

The sizing code looks right to me, but I'm wondering whether we should report the unscaled values in the info overlay?
Comment 4 Will Thompson 2016-01-08 14:15:11 UTC
Created attachment 318495 [details] [review]
screenshot-window-sizer: hidpi support

The new logical dimensions are reported in the overlay, rather than the
pixel dimensions. That is: if scaleFactor is 2, a window might be
resized to 2400×1350 device pixels, which will be reported as 1200×675
in the overlay.

This is consistent with (for example) the DevTools in Chrome, which
reports the logical size of the viewport when you resize the window,
rather than the physical pixel size.

Tested with a freely-resizable window and with a constrained-geometry
window (GNOME Terminal), on a hidpi display.
Comment 5 Florian Müllner 2016-01-08 14:23:40 UTC
Review of attachment 318495 [details] [review]:

LGTM, thanks!
Comment 6 Will Thompson 2016-01-08 14:25:06 UTC
Thanks!

Attachment 318495 [details] pushed as 5b1f770 - screenshot-window-sizer: hidpi support