Skip to content

Commit

Permalink
Disable scaling support in GTK+3
Browse files Browse the repository at this point in the history
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
  • Loading branch information
alexlarsson authored and XRevan86 committed Apr 4, 2016
1 parent bc4d0dd commit cc50d15
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit cc50d15

Please sign in to comment.