Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hidpi patches for gtk+-3.0 #51

Merged
merged 1 commit into from
Feb 27, 2016
Merged

Add hidpi patches for gtk+-3.0 #51

merged 1 commit into from
Feb 27, 2016

Conversation

lazka
Copy link

@lazka lazka commented Feb 27, 2016

One in gtk+ to use the system provided scaling factor and one
in cairo to disable CGContexts scaling so we can do our own scaling.

This fixes pixelated rendering in all cases where the gtk pixel cache
is used (treeviews..) and where icons are converted to cairo surfaces.

Any remaining pixelation (DnD, menu icons) was fixed in gtk+3.18

This also adds the gtk patch to gtk+-3.14 as the cairo patch alone breaks
drawing on hidpi setups without the gtk+ counterpart.


I've shipped these patches for a year now with gtk+3.16 and my hidpi fixes which are also included in gtk+3.18: https://git.gnome.org/browse/gtk+/log/?qt=grep&q=quartz.*hidpi

I haven't found the time to look into upstreaming these.. but I guess it would be good to have working hidpi with gtk-osx.

@lazka
Copy link
Author

lazka commented Feb 27, 2016

To clarify: These patches here are not in gtk+/cairo master. I've only pushed fixes for problems exposed by these two patches in gtk+ master.

HiDPI can be enabled on non-retina displays using the "Graphic Tools for Xcode" afair. It exposes an additional hidpi resolution option in the normal display resolution dialog.

@lazka
Copy link
Author

lazka commented Feb 27, 2016

For how the pixelation looks, here is an example: https://cloud.githubusercontent.com/assets/4942960/8472311/706ab996-20a0-11e5-935e-c2cc4bbeaf1d.png

@jralls
Copy link
Owner

jralls commented Feb 27, 2016

To clarify: These patches here are not in gtk+/cairo master. I've only pushed fixes for problems exposed by these two patches in gtk+ master.

OK, where did they come from? If they're on bugs then include the bug in the patch name so that we know when to take them out.

Also you need to rebase your branch, the PR currently undoes the pango update.

@lazka
Copy link
Author

lazka commented Feb 27, 2016

OK, where did they come from? If they're on bugs then include the bug in the patch name so that we know when to take them out.

Will do.

Also you need to rebase your branch, the PR currently undoes the pango update.

oops :/

One in gtk+ to use the system provided scaling factor and one
in cairo to disable CGContexts scaling so we can do our own scaling.

This fixes pixelated rendering in all cases where the gtk pixel cache
is used (treeviews..) and where icons are converted to cairo surfaces.

Any additional remaining pixelation (DnD, menu icons) was fixed in gtk+3.18
and will still occur with these patches on older gtk+.

This also adds the gtk patch to gtk+-3.14 as the cairo patch alone breaks
drawing on hidpi setups without the gtk+ counterpart.

Source bug reports:

https://bugs.freedesktop.org/show_bug.cgi?id=69796#c4
https://bugzilla.gnome.org/show_bug.cgi?id=740199#c4
@lazka
Copy link
Author

lazka commented Feb 27, 2016

OK, where did they come from? If they're on bugs then include the bug in the patch name so that we know when to take them out.

Will do.

Added links to the source bugs as xml comment in the module and in the commit message.

Also you need to rebase your branch, the PR currently undoes the pango update.

oops :/

fixed now

@jralls jralls merged commit a382621 into jralls:master Feb 27, 2016
@jralls
Copy link
Owner

jralls commented Feb 27, 2016

Thanks.

You need to cherry-pick the commits from gtk-3-18 to master ASAP so they make it into 3.20!

@lazka
Copy link
Author

lazka commented Feb 28, 2016

Thanks

You need to cherry-pick the commits from gtk-3-18 to master ASAP so they make it into 3.20!

Sorry, I don't follow. Which commits?

@jralls
Copy link
Owner

jralls commented Feb 28, 2016

The two commits that you made in gtk-3.18, that you referenced in your opening message and then said aren't in master.

@lazka
Copy link
Author

lazka commented Feb 28, 2016

I meant I've pushed them during the 3.18 cycle, so they are also in master. Sorry for the confusion :/

@jralls
Copy link
Owner

jralls commented Mar 8, 2016

https://bugzilla.gnome.org/show_bug.cgi?id=763269 reports that this breaks gtk-2-24. That shouldn't be a surprise as your comment on the commit points out. Unfortunately gtk2 doesn't implement gdk_quartz_window_ref_cairo_surface so we can't backport the gtk3 patch.

I think we can work around that by moving the cairo patch to gdk_quartz_create_cairo_surface in gdk/quartz/gdkwindow-quartz.c after checking that we got a context (line 294 in master). I don't have a retina monitor so I can't test it. Can you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants