[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master fe49aa1: Always use gtk_window_move in new versions
From: |
Philipp Stephani |
Subject: |
[Emacs-diffs] master fe49aa1: Always use gtk_window_move in new versions |
Date: |
Sun, 27 Aug 2017 08:46:13 -0400 (EDT) |
branch: master
commit fe49aa17d505f13926eac2212b89effec9bd3c98
Author: Philipp Stephani <address@hidden>
Commit: Philipp Stephani <address@hidden>
Always use gtk_window_move in new versions
* src/gtkutil.c (my_log_handler): Don’t define in new versions of
GTK+.
(xg_set_geometry): Always use gtk_window_move in new versions of GTK+.
* src/xterm.c (syms_of_xterm): Document that x-gtk-use-window-move
is ignored.
* lisp/subr.el (x-gtk-use-window-move): Make obsolete.
---
etc/NEWS | 4 ++++
lisp/subr.el | 2 ++
src/gtkutil.c | 6 ++++++
src/xterm.c | 3 ++-
4 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/etc/NEWS b/etc/NEWS
index d53e0d2..6cd4bca 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1261,6 +1261,10 @@ break.
** The arguments LOCKNAME and MUSTBENEW of 'write-region' are
propagated to file name handlers now.
+** When built against recent versions of GTK+, Emacs always uses
+gtk_window_move for moving frames and ignores the value of the
+variable 'x-gtk-use-window-move'. The variable is now obsolete.
+
* Lisp Changes in Emacs 26.1
diff --git a/lisp/subr.el b/lisp/subr.el
index b3f9f90..2ad52f6 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1478,6 +1478,8 @@ be a list of the form returned by `event-start' and
`event-end'."
;; but Stefan insists to mark it so.
(make-obsolete-variable 'translation-table-for-input nil "23.1")
+(make-obsolete-variable 'x-gtk-use-window-move nil "26.1")
+
(defvaralias 'messages-buffer-max-lines 'message-log-max)
;;;; Alternate names for functions - these are not being phased out.
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 7a110da..a2e9f26 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -792,6 +792,7 @@ xg_hide_tooltip (struct frame *f)
General functions for creating widgets, resizing, events, e.t.c.
***********************************************************************/
+#if ! GTK_CHECK_VERSION (3, 22, 0)
static void
my_log_handler (const gchar *log_domain, GLogLevelFlags log_level,
const gchar *msg, gpointer user_data)
@@ -799,6 +800,7 @@ my_log_handler (const gchar *log_domain, GLogLevelFlags
log_level,
if (!strstr (msg, "visible children"))
fprintf (stderr, "XX %s-WARNING **: %s\n", log_domain, msg);
}
+#endif
/* Make a geometry string and pass that to GTK. It seems this is the
only way to get geometry position right if the user explicitly
@@ -810,8 +812,10 @@ xg_set_geometry (struct frame *f)
{
if (f->size_hint_flags & (USPosition | PPosition))
{
+#if ! GTK_CHECK_VERSION (3, 22, 0)
if (x_gtk_use_window_move)
{
+#endif
/* Handle negative positions without consulting
gtk_window_parse_geometry (Bug#25851). The position will
be off by scrollbar width + window manager decorations. */
@@ -828,6 +832,7 @@ xg_set_geometry (struct frame *f)
/* Reset size hint flags. */
f->size_hint_flags &= ~ (XNegative | YNegative);
+# if ! GTK_CHECK_VERSION (3, 22, 0)
}
else
{
@@ -859,6 +864,7 @@ xg_set_geometry (struct frame *f)
g_log_remove_handler ("Gtk", id);
}
+#endif
}
}
diff --git a/src/xterm.c b/src/xterm.c
index d9a6df7..eff1519 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -13311,6 +13311,7 @@ transition between the various maximization states.
*/);
doc: /* Non-nil means rely on gtk_window_move to set frame positions.
If this variable is t (the default), the GTK build uses the function
gtk_window_move to set or store frame positions and disables some time
-consuming frame position adjustments. */);
+consuming frame position adjustments. In newer versions of GTK, Emacs
+always uses gtk_window_move and ignores the value of this variable. */);
x_gtk_use_window_move = true;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master fe49aa1: Always use gtk_window_move in new versions,
Philipp Stephani <=