From cc50d1582212b5fdb87533222eb228e68fafa12d Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Tue, 20 Aug 2013 12:03:42 +0000 Subject: [PATCH] Disable scaling support in GTK+3 We can't really support the GTK+3 automatic scaling, as to much code relies on the GdkWindow and XWindow sizes, etc to match. In order to keep working we just disable the scaling, meaning we will pick up the larger fonts, but nothing else. Its not ideal but it works for now. https://bugzilla.gnome.org/show_bug.cgi?id=706388 https://git.gnome.org/browse/metacity/commit/?id=a1b96fd --- src/main.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main.c b/src/main.c index 63db08b..5bb23cb 100644 --- a/src/main.c +++ b/src/main.c @@ -5900,6 +5900,13 @@ int main(int argc, char *argv[]) gdkdisplay = gdk_display_get_default(); xdisplay = gdk_x11_display_get_xdisplay(gdkdisplay); +#if GTK_CHECK_VERSION(3, 10, 0) + /* We need to be able to fully trust that the window and monitor sizes + * that GDK reports corresponds to the X ones, so we disable the automatic + * scale handling */ + gdk_x11_display_set_window_scale(gdkdisplay, 1); +#endif + frame_window_atom = XInternAtom(xdisplay, DECOR_INPUT_FRAME_ATOM_NAME, FALSE); win_decor_atom = XInternAtom(xdisplay, DECOR_WINDOW_ATOM_NAME, FALSE); win_blur_decor_atom = XInternAtom(xdisplay, DECOR_BLUR_ATOM_NAME, FALSE);