GNOME Bugzilla – Bug 753621
Calculate screen physical size
Last modified: 2015-08-16 10:35:23 UTC
I'm attaching a (very simple) patch to calculate the physical size of the GdkScreen, this makes gdk_screen_get_width/height_mm work, I found evince size/scale calculations to depend on it, this patch is enough to make evince able to zoom in/out (and find out that touchpad gestures just work there, yay). The implementation might be more complex though, it doesn't account for monitors covering overlapping areas, and I see this breaking for >3 monitors arranged as a grid. It IMO covers most common usecases though, should we maybe try to be smarter from the start anyway?
Created attachment 309256 [details] [review] wayland: calculate screen physical size A simple calculation is done so far (assuming monitor areas never overlap) so gdk_screen_get_width/height_mm return meaningful values.
We should probably make this api limp along like your patch does, but it would be good to consider deprecating it and make evince use monitor dimensions instead of screen dimensions. Because in the wayland world, we don't really have screens.
Attachment 309256 [details] pushed as 02f3fe0 - wayland: calculate screen physical size
Just filed bug #753675 to evince so that's not lost.