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 729013 - Use OUTPUT_SCALE instead of xft-dpi on wayland
Use OUTPUT_SCALE instead of xft-dpi on wayland
Status: RESOLVED OBSOLETE
Product: gnome-shell
Classification: Core
Component: st
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on: 728902
Blocks:
 
 
Reported: 2014-04-26 11:07 UTC by drago01
Modified: 2021-07-05 14:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
compositor: Add meta_get_primary_scale_factor api (1.95 KB, patch)
2014-04-26 12:08 UTC, drago01
reviewed Details | Review
gdkscreen-wayland: Emit monitors-changed when the output scale changes (786 bytes, patch)
2014-04-26 12:09 UTC, drago01
committed Details | Review
hidpi: Use meta_get_primary_scale_factor (2.39 KB, patch)
2014-04-26 15:31 UTC, drago01
none Details | Review
compositor: Add meta_get_primary_scale_factor api (2.04 KB, patch)
2014-05-03 19:54 UTC, drago01
none Details | Review

Description drago01 2014-04-26 11:07:26 UTC
We should use the OUTPUT_SCALE that is set the primary output instead of xft-dpi when running as wayland compositor (the latter should no longer be set see bug  729012 )
Comment 1 drago01 2014-04-26 12:08:10 UTC
Created attachment 275204 [details] [review]
compositor: Add meta_get_primary_scale_factor api

This gets used by gnome-shell to query the scale factor.
Comment 2 drago01 2014-04-26 12:09:39 UTC
Created attachment 275205 [details] [review]
gdkscreen-wayland: Emit monitors-changed when the output scale changes
Comment 3 Jasper St. Pierre (not reading bugmail) 2014-04-26 13:50:13 UTC
Review of attachment 275205 [details] [review]:

We should probably have a better signal than this. notify::scale or something.
Comment 4 Jasper St. Pierre (not reading bugmail) 2014-04-26 13:51:25 UTC
Review of attachment 275204 [details] [review]:

::: src/compositor/compositor.c
@@ +185,3 @@
+
+int
+meta_get_primary_scale_factor ()

(void)

@@ +199,3 @@
+          if (outputs[i].is_primary)
+            {
+              scale_factor = outputs[i].scale;

Is outputs[i].scale not set in the RANDR backend? I'd rather just add something there.

@@ +202,3 @@
+              break;
+            }
+      }

Indentation here is screwy.
Comment 5 drago01 2014-04-26 15:31:42 UTC
Created attachment 275217 [details] [review]
hidpi: Use meta_get_primary_scale_factor

Don't query the xsettings directly but ask mutter for the scale factor
instead. Also go back to use 'monitors-changed' to not depend on xsettings.


Forgot to attach this one.
Comment 6 drago01 2014-04-26 15:33:26 UTC
Comment on attachment 275205 [details] [review]
gdkscreen-wayland: Emit monitors-changed when the output scale changes

Attachment 275205 [details] pushed as b395929 - gdkscreen-wayland: Emit monitors-changed when the output scale changes
Comment 7 drago01 2014-04-26 15:34:42 UTC
(In reply to comment #4)
> Review of attachment 275204 [details] [review]:

> 
> @@ +199,3 @@
> +          if (outputs[i].is_primary)
> +            {
> +              scale_factor = outputs[i].scale;
> 
> Is outputs[i].scale not set in the RANDR backend? I'd rather just add something
> there.

Yeah I though about it but we don't have per monitor scaling on X anyway and apps read ot the xsetting anyway (and we don't want to do xsettings in mutter) so it does not add much value.
Comment 8 Jasper St. Pierre (not reading bugmail) 2014-04-26 15:47:04 UTC
Even if we fill outputs[i].scale from gdk-window-scaling-factor in meta-monitor-manager-xrandr.c, that would be better for me.
Comment 9 drago01 2014-04-26 15:50:33 UTC
(In reply to comment #8)
> Even if we fill outputs[i].scale from gdk-window-scaling-factor in
> meta-monitor-manager-xrandr.c, that would be better for me.

OK fair enough.
Comment 10 drago01 2014-04-26 16:31:44 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > Even if we fill outputs[i].scale from gdk-window-scaling-factor in
> > meta-monitor-manager-xrandr.c, that would be better for me.
> 
> OK fair enough.

Hmm actually no ... we don't know whether mutter gets the xrandr events first or g-s-d so we have a race here and might end up setting the wrong value. Unless we want to connect to the signal in mutter and keep updating it.
Comment 11 drago01 2014-05-03 19:54:19 UTC
Created attachment 275761 [details] [review]
compositor: Add meta_get_primary_scale_factor api

This gets used by gnome-shell to query the scale factor.

--

Fix whitespace and rebase bug.
Still using the xsetting though.
Comment 12 GNOME Infrastructure Team 2021-07-05 14:26:36 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of  gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/

Thank you for your understanding and your help.