diff options
author | Noam Postavsky <npostavs@gmail.com> | 2018-01-26 20:45:38 -0500 |
---|---|---|
committer | Noam Postavsky <npostavs@gmail.com> | 2018-01-26 20:45:38 -0500 |
commit | f5357b1ca4ae90e7ad6d8321884319cfdf828508 (patch) | |
tree | 5706d28900dd4f7441bae1629242a2ca029d645b /src/gtkutil.c | |
parent | c9a268552c8294bbca607da239528e6b89f8fb5b (diff) | |
parent | 463f96b4813fb77d88a7b0fa93f94aa08d71689f (diff) | |
download | emacs-f5357b1ca4ae90e7ad6d8321884319cfdf828508.tar.gz |
Merge from emacs-26
463f96b481 * doc/lispref/searching.texi: Document regexp repetition l...
08a6195571 ; test/README: Document TEST_LOAD_EL parameter.
7bbea90b1a * src/syntax.c (char-syntax): Warn about ignoring text pro...
50fcbb5f61 ; * src/process.c (Fprocess_contact): Fix docstring typo.
81ae9c8c05 Load mm-util as needed for url-file and url-data (Bug#30258)
5a1ee67ae1 Another minor copyedit in the manual's "Scroll Bars"
226a651e9e Minor fix in documentation of 'equal'
b26786c8d9 * lisp/dired-x.el (dired-guess-shell-alist-user): Doc fix....
5699a824f0 Minor rewording in Emacs manual's "Help Mode" node
f35ff0156e Fixes for Emacs manual in frames.texi
6cd4e8dcc5 * doc/misc/cl.texi (Efficiency Concerns): Fix 2012-10-27 t...
1412cf3edd Fix a few issues with latest GTK scaling changes
59db8dca03 Use scaled coordinates when calling into GTK
2892f05792 Scale monitor dimensions obtained from GTK
Diffstat (limited to 'src/gtkutil.c')
-rw-r--r-- | src/gtkutil.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gtkutil.c b/src/gtkutil.c index 825651cf083..3f21288f461 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -825,6 +825,7 @@ xg_set_geometry (struct frame *f) { if (f->size_hint_flags & (USPosition | PPosition)) { + int scale = xg_get_scale (f); #if ! GTK_CHECK_VERSION (3, 22, 0) if (x_gtk_use_window_move) { @@ -840,8 +841,9 @@ xg_set_geometry (struct frame *f) f->top_pos = (x_display_pixel_height (FRAME_DISPLAY_INFO (f)) - FRAME_PIXEL_HEIGHT (f) + f->top_pos); + /* GTK works in scaled pixels, so convert from X pixels. */ gtk_window_move (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), - f->left_pos, f->top_pos); + f->left_pos / scale, f->top_pos / scale); /* Reset size hint flags. */ f->size_hint_flags &= ~ (XNegative | YNegative); @@ -849,9 +851,10 @@ xg_set_geometry (struct frame *f) } else { - int left = f->left_pos; + /* GTK works in scaled pixels, so convert from X pixels. */ + int left = f->left_pos / scale; int xneg = f->size_hint_flags & XNegative; - int top = f->top_pos; + int top = f->top_pos / scale; int yneg = f->size_hint_flags & YNegative; char geom_str[sizeof "=x--" + 4 * INT_STRLEN_BOUND (int)]; guint id; |